Skip to content

Commit 1576bb7

Browse files
hotkeys: help plugins like outdated mpris to not crash after deadbeef update
1 parent f244246 commit 1576bb7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/hotkeys/hotkeys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,13 @@ hotkeys_reset (void) {
576576
#endif
577577
}
578578

579+
// Some 3rd party plugins (mpris) rely on hotkeys plugin having non-null get_actions method.
580+
// It's already patched, but let's be nice to people who didn't update yet.
581+
static DB_plugin_action_t *
582+
hotkeys_get_actions (DB_playItem_t *it) {
583+
return NULL;
584+
}
585+
579586

580587
// define plugin interface
581588
static DB_hotkeys_plugin_t plugin = {
@@ -615,4 +622,5 @@ static DB_hotkeys_plugin_t plugin = {
615622
.get_action_for_keycombo = hotkeys_get_action_for_keycombo,
616623
.reset = hotkeys_reset,
617624
.misc.plugin.message = hotkeys_message,
625+
.misc.plugin.get_actions = hotkeys_get_actions,
618626
};

0 commit comments

Comments
 (0)