comparison finch/gntplugin.c @ 18099:7be04c20bf22

Let's not crash if there's no plugin.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 15 Jun 2007 02:36:53 +0000
parents a924c94ce5da
children b8572b937c09
comparison
equal deleted inserted replaced
18098:1c8853f6bfc6 18099:7be04c20bf22
103 selection_changed(GntWidget *widget, gpointer old, gpointer current, gpointer null) 103 selection_changed(GntWidget *widget, gpointer old, gpointer current, gpointer null)
104 { 104 {
105 PurplePlugin *plugin = current; 105 PurplePlugin *plugin = current;
106 char *text; 106 char *text;
107 GList *list = NULL, *iter = NULL; 107 GList *list = NULL, *iter = NULL;
108
109 if (!plugin)
110 return;
108 111
109 /* If the selected plugin was unseen before, mark it as seen. But save the list 112 /* If the selected plugin was unseen before, mark it as seen. But save the list
110 * only when the plugin list is closed. So if the user enables a plugin, and it 113 * only when the plugin list is closed. So if the user enables a plugin, and it
111 * crashes, it won't get marked as seen so the user can fix the bug and still 114 * crashes, it won't get marked as seen so the user can fix the bug and still
112 * quickly find the plugin in the list. 115 * quickly find the plugin in the list.