Skip to content

Commit 5ff416c

Browse files
committed
fix running with latest upstream changes
1 parent ca87eee commit 5ff416c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/mpris.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)