[geany/geany] 99150b: Check plugin actually has a help function before invoking it
Colomban Wendling
git-noreply at xxxxx
Tue Apr 3 21:53:39 UTC 2018
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sat, 10 Mar 2018 22:23:29 UTC
Commit: 99150b0ccac9a0f43b9ca342a5aca31c3bdc1768
https://github.com/geany/geany/commit/99150b0ccac9a0f43b9ca342a5aca31c3bdc1768
Log Message:
-----------
Check plugin actually has a help function before invoking it
This should not be needed in normal operation, but is safer if the UI
gets out of sync for some reason.
Modified Paths:
--------------
src/plugins.c
Modified: src/plugins.c
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -1865,7 +1865,10 @@ static void pm_on_plugin_button_clicked(G_GNUC_UNUSED GtkButton *button, gpointe
if (GPOINTER_TO_INT(user_data) == PM_BUTTON_CONFIGURE)
plugin_show_configure(&p->public);
else if (GPOINTER_TO_INT(user_data) == PM_BUTTON_HELP)
+ {
+ g_return_if_fail(p->cbs.help != NULL);
p->cbs.help(&p->public, p->cb_data);
+ }
else if (GPOINTER_TO_INT(user_data) == PM_BUTTON_KEYBINDINGS && p->key_group && p->key_group->plugin_key_count > 0)
keybindings_dialog_show_prefs_scroll(p->info.name);
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list