/soc/2013/ankitkv/gobjectification: 390b5ea67313: Fix a possible...

Ankit Vani a at nevitus.org
Fri Aug 2 06:53:22 EDT 2013


Changeset: 390b5ea6731394f2084145e01b36de389fc27317
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-02 16:22 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/390b5ea67313

Description:

Fix a possible false negative in determining whether a plugin is configurable or not

diffstat:

 finch/gntplugin.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (21 lines):

diff --git a/finch/gntplugin.c b/finch/gntplugin.c
--- a/finch/gntplugin.c
+++ b/finch/gntplugin.c
@@ -101,11 +101,12 @@ decide_conf_button(GPluginPlugin *plugin
 	GPluginPluginInfo *info = gplugin_plugin_get_info(plugin);
 
 	if (purple_plugin_is_loaded(plugin)) {
-		if (FINCH_IS_PLUGIN_INFO(info)) {
-			FinchPluginInfoPrivate *priv = FINCH_PLUGIN_INFO_GET_PRIVATE(info);
-			if (priv->get_pref_frame)
-				visible = TRUE;
-		} else if (purple_plugin_info_get_pref_frame_callback(PURPLE_PLUGIN_INFO(info))) {
+		FinchPluginInfoPrivate *priv = NULL;
+		if (FINCH_IS_PLUGIN_INFO(info))
+			priv = FINCH_PLUGIN_INFO_GET_PRIVATE(info);
+
+		if ((priv && priv->get_pref_frame) ||
+			(purple_plugin_info_get_pref_frame_callback(PURPLE_PLUGIN_INFO(info)))) {
 			visible = TRUE;
 		}
 	}



More information about the Commits mailing list