/pidgin/main: 26e7a3057f0c: Plugins API: fix a crash

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Oct 24 10:33:45 EDT 2013


Changeset: 26e7a3057f0c815d1ef4fc8984b816f448103772
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-10-24 16:33 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/26e7a3057f0c

Description:

Plugins API: fix a crash

diffstat:

 pidgin/gtkplugin.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff --git a/pidgin/gtkplugin.c b/pidgin/gtkplugin.c
--- a/pidgin/gtkplugin.c
+++ b/pidgin/gtkplugin.c
@@ -190,8 +190,12 @@ pidgin_plugin_open_config(PurplePlugin *
 		return;
 
 	pinfo = plugin->info->prefs_info;
-	has_purple_frame = (pinfo->get_plugin_pref_frame != NULL);
-	has_purple_request = (pinfo->get_plugin_pref_request != NULL);
+	if (pinfo == NULL)
+		has_purple_frame = has_purple_request = FALSE;
+	else {
+		has_purple_frame = (pinfo->get_plugin_pref_frame != NULL);
+		has_purple_request = (pinfo->get_plugin_pref_request != NULL);
+	}
 	has_pidgin_frame = (PIDGIN_IS_PIDGIN_PLUGIN(plugin) &&
 		plugin->info->ui_info &&
 		PIDGIN_PLUGIN_UI_INFO(plugin)->get_config_frame);



More information about the Commits mailing list