File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ void ProjectMWrapper::initialize(Poco::Util::Application& app)
3636 auto texturePaths = GetPathListWithDefault (" texturePath" , app.config ().getString (" " , " " ));
3737
3838 _projectM = projectm_create ();
39+ if (!_projectM)
40+ {
41+ poco_error (_logger, " Failed to initialize projectM. Possible reasons are a lack of required OpenGL features or GPU resources." );
42+ throw std::runtime_error (" projectM initialization failed" );
43+ }
3944
4045 int fps = _projectMConfigView->getInt (" fps" , 60 );
4146 if (fps <= 0 )
@@ -72,6 +77,12 @@ void ProjectMWrapper::initialize(Poco::Util::Application& app)
7277
7378 // Playlist
7479 _playlist = projectm_playlist_create (_projectM);
80+ if (!_playlist)
81+ {
82+
83+ poco_error (_logger, " Failed to create the projectM preset playlist manager instance." );
84+ throw std::runtime_error (" Playlist initialization failed" );
85+ }
7586
7687 projectm_playlist_set_shuffle (_playlist, _projectMConfigView->getBool (" shuffleEnabled" , true ));
7788
You can’t perform that action at this time.
0 commit comments