File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,20 @@ static int onConnect() {
7474 debug ("artwork plugin not detected... album art support disabled\n" );
7575 }
7676
77- DB_plugin_t * hotkeysPlugin = mprisData .deadbeef -> plug_get_for_id ("hotkeys" );
7877 DB_plugin_t * * plugins = mprisData .deadbeef -> plug_get_list ();
7978 for (int i = 0 ; plugins [i ]; i ++ ) {
80- for (DB_plugin_action_t * dbaction = plugins [i ]-> get_actions (NULL ); dbaction ; dbaction = dbaction -> next ) {
81- if (strcmp (dbaction -> name , "prev_or_restart" ) == 0 ) {
82- debug ("prev_or_restart command detected... previous or restart support enabled\n" );
83- mprisData .prevOrRestart = dbaction ;
84- break ;
79+ if (plugins [i ]-> get_actions != NULL ) {
80+ for (DB_plugin_action_t * dbaction = plugins [i ]-> get_actions (NULL ); dbaction ; dbaction = dbaction -> next ) {
81+ if (strcmp (dbaction -> name , "prev_or_restart" ) == 0 ) {
82+ debug ("prev_or_restart command detected... previous or restart support enabled\n" );
83+ mprisData .prevOrRestart = dbaction ;
84+ break ;
85+ }
8586 }
86- }
8787
88- if (mprisData .prevOrRestart != NULL ) {
89- break ;
88+ if (mprisData .prevOrRestart != NULL ) {
89+ break ;
90+ }
9091 }
9192 }
9293
You can’t perform that action at this time.
0 commit comments