[evolution-patches] Patch for shell crash (#43322)



-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1278
diff -u -p -r1.1278 ChangeLog
--- ChangeLog	19 May 2003 19:41:05 -0000	1.1278
+++ ChangeLog	19 May 2003 22:36:38 -0000
@@ -1,5 +1,16 @@
 2003-05-19  Ettore Perazzoli  <ettore ximian com>
 
+	[#43322]
+
+	* e-shell-shared-folder-picker-dialog.c (storage_weak_notify): Set
+	the storage member to NULL.
+	(shell_view_weak_notify): Set the parent member to NULL.
+	(shell_weak_notify): Set the shell member to NULL.
+	(cleanup_discovery): g_object_weak_unref() shell, parent and
+	storage.
+
+2003-05-19  Ettore Perazzoli  <ettore ximian com>
+
 	* main.c: Removed "forced_upgrade" unused variable.
 	(show_development_warning): Put in a DEVELOPMENT_WARNING cpp
 	conditional.
Index: e-shell-shared-folder-picker-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-shared-folder-picker-dialog.c,v
retrieving revision 1.22
diff -u -p -r1.22 e-shell-shared-folder-picker-dialog.c
--- e-shell-shared-folder-picker-dialog.c	25 Mar 2003 15:48:33 -0000	1.22
+++ e-shell-shared-folder-picker-dialog.c	19 May 2003 22:36:39 -0000
@@ -292,6 +292,10 @@ show_dialog (EShell *shell,
 
 /* Discovery process.  */
 
+static void shell_weak_notify (void *data, GObject *where_the_object_was);
+static void shell_view_weak_notify (void *data, GObject *where_the_object_was);
+static void storage_weak_notify (void *data, GObject *where_the_object_was);
+
 struct _DiscoveryData {
 	EShell *shell;
 	EShellView *parent;
@@ -308,6 +312,15 @@ cleanup_discovery (DiscoveryData *discov
 	if (discovery_data->dialog != NULL)
 		gtk_widget_destroy (discovery_data->dialog);
 
+	if (discovery_data->shell != NULL)
+		g_object_weak_unref (G_OBJECT (discovery_data->shell), shell_weak_notify, discovery_data);
+
+	if (discovery_data->parent != NULL)
+		g_object_weak_unref (G_OBJECT (discovery_data->parent), shell_view_weak_notify, discovery_data);
+
+	if (discovery_data->storage != NULL)
+		g_object_weak_unref (G_OBJECT (discovery_data->storage), storage_weak_notify, discovery_data);
+
 	g_free (discovery_data->user_email_address);
 	g_free (discovery_data->folder_name);
 	g_object_unref (discovery_data->storage);
@@ -406,6 +419,8 @@ shell_weak_notify (void *data,
 	DiscoveryData *discovery_data;
 
 	discovery_data = (DiscoveryData *) data;
+	discovery_data->shell = NULL;
+
 	cleanup_discovery (discovery_data);
 }
 
@@ -426,6 +441,8 @@ storage_weak_notify (void *data,
 	DiscoveryData *discovery_data;
 
 	discovery_data = (DiscoveryData *) data;
+	discovery_data->storage = NULL;
+
 	cleanup_discovery (discovery_data);
 
 	/* FIXME: Should we signal the user when this happens?  I.e. when the


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]