commit ee05233822e1d70b23868dc6ca98fc81e151f6f7
parent ac88ed4935db41631503d6cdc891b025345a1b45
Author: Colin Leroy <colin@colino.net>
Date: Thu, 14 Aug 2008 18:10:53 +0000
2008-08-14 [colin] 3.5.0cvs59
* src/folder.c
Don't crash if parent is null when creating
a folder
* src/gtk/pluginwindow.c
Don't crash on race when closing window while
a plugin is loading and does gtk_iterations
Diffstat:
5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-14 [colin] 3.5.0cvs59
+
+ * src/folder.c
+ Don't crash if parent is null when creating
+ a folder
+ * src/gtk/pluginwindow.c
+ Don't crash on race when closing window while
+ a plugin is loading and does gtk_iterations
+
2008-08-13 [colin] 3.5.0cvs58
* src/messageview.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3470,3 +3470,4 @@
( cvs diff -u -r 1.1.4.47 -r 1.1.4.48 src/gtk/gtksctree.c; ) > 3.5.0cvs56.patchset
( cvs diff -u -r 1.395.2.381 -r 1.395.2.382 src/summaryview.c; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/gtkcmclist.c; ) > 3.5.0cvs57.patchset
( cvs diff -u -r 1.94.2.183 -r 1.94.2.184 src/messageview.c; cvs diff -u -r 1.19.2.20 -r 1.19.2.21 src/messageview.h; cvs diff -u -r 1.83.2.142 -r 1.83.2.143 src/mimeview.c; ) > 3.5.0cvs58.patchset
+( cvs diff -u -r 1.213.2.184 -r 1.213.2.185 src/folder.c; cvs diff -u -r 1.5.2.53 -r 1.5.2.54 src/gtk/pluginwindow.c; ) > 3.5.0cvs59.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=58
+EXTRA_VERSION=59
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/folder.c b/src/folder.c
@@ -964,6 +964,8 @@ void folder_fast_scan_tree(Folder *folder)
FolderItem *folder_create_folder(FolderItem *parent, const gchar *name)
{
FolderItem *new_item;
+
+ g_return_val_if_fail(parent != NULL, NULL);
new_item = parent->folder->klass->create_folder(parent->folder, parent, name);
if (new_item) {
diff --git a/src/gtk/pluginwindow.c b/src/gtk/pluginwindow.c
@@ -53,6 +53,8 @@ typedef struct _PluginWindow
GtkWidget *unload_btn;
Plugin *selected_plugin;
+
+ gboolean loading;
} PluginWindow;
static GtkListStore* pluginwindow_create_data_store (void);
@@ -66,6 +68,8 @@ static gboolean pluginwindow_selected (GtkTreeSelection *selector,
static void close_cb(GtkButton *button, PluginWindow *pluginwindow)
{
+ if (pluginwindow->loading)
+ return;
gtk_widget_destroy(pluginwindow->window);
g_free(pluginwindow);
plugin_save_list();
@@ -75,6 +79,8 @@ static void close_cb(GtkButton *button, PluginWindow *pluginwindow)
static gint pluginwindow_delete_cb(GtkWidget *widget, GdkEventAny *event,
PluginWindow *pluginwindow)
{
+ if (pluginwindow->loading)
+ return FALSE;
close_cb(NULL,pluginwindow);
return TRUE;
}
@@ -180,7 +186,9 @@ static void unload_cb(GtkButton *button, PluginWindow *pluginwindow)
Plugin *plugin = pluginwindow->selected_plugin;
g_return_if_fail(plugin != NULL);
+ pluginwindow->loading = TRUE;
plugin_unload(plugin);
+ pluginwindow->loading = FALSE;
pluginwindow->selected_plugin = NULL;
set_plugin_list(pluginwindow);
}
@@ -195,7 +203,7 @@ static void load_cb(GtkButton *button, PluginWindow *pluginwindow)
if (file_list) {
GList *tmp;
-
+ pluginwindow->loading = TRUE;
for ( tmp = file_list; tmp; tmp = tmp->next) {
gchar *file, *error = NULL;
@@ -215,7 +223,7 @@ static void load_cb(GtkButton *button, PluginWindow *pluginwindow)
set_plugin_list(pluginwindow);
g_free(file);
}
-
+ pluginwindow->loading = FALSE;
g_list_free(file_list);
}
}