summaryrefslogtreecommitdiff
path: root/src/nautilus-information-panel.c
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2001-12-12 20:14:52 +0000
committerMichael Meeks <michael@src.gnome.org>2001-12-12 20:14:52 +0000
commitf9769d4cd3a5e9fb3784b45a356cbd9a1d718e14 (patch)
treedc9a5aa9e8fd4a36876424be881be14730e7f0ea /src/nautilus-information-panel.c
parent57b746384ea0caba39590822e272ecce8ae6a805 (diff)
downloadnautilus-f9769d4cd3a5e9fb3784b45a356cbd9a1d718e14.tar.gz
protect vs. double destroy.
2001-12-12 Michael Meeks <michael@ximian.com> * src/nautilus-window.c (nautilus_window_destroy): protect vs. double destroy. * src/nautilus-window-manage-views.c (disconnect_view): start macro definitions on the first line. * src/nautilus-sidebar.c (nautilus_sidebar_destroy): protect vs. double destroy. * src/nautilus-sidebar-tabs.c (nautilus_sidebar_tabs_destroy): protect vs. double destroy and theoretical re-enterancy hazard. * src/nautilus-sidebar-title.c (nautilus_sidebar_title_destroy): protect vs. double destroys. * src/nautilus-application.c (create_object): re-enable list view. * src/file-manager/fm-list-view.c: re-enable.
Diffstat (limited to 'src/nautilus-information-panel.c')
-rw-r--r--src/nautilus-information-panel.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index a85d7090d..76827e458 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -304,23 +304,26 @@ nautilus_sidebar_destroy (GtkObject *object)
sidebar = NAUTILUS_SIDEBAR (object);
- g_object_unref (sidebar->details->notebook);
-
- if (sidebar->details->file != NULL) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
- sidebar->details->file_changed_connection);
- nautilus_file_monitor_remove (sidebar->details->file, sidebar);
- nautilus_file_unref (sidebar->details->file);
+ if (sidebar->details) {
+ g_object_unref (sidebar->details->notebook);
+
+ if (sidebar->details->file != NULL) {
+ gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
+ sidebar->details->file_changed_connection);
+ nautilus_file_monitor_remove (sidebar->details->file, sidebar);
+ nautilus_file_unref (sidebar->details->file);
+ }
+
+ gtk_object_sink (GTK_OBJECT (sidebar->details->title_tab));
+
+ g_free (sidebar->details->uri);
+ g_free (sidebar->details->default_background_color);
+ g_free (sidebar->details->default_background_image);
+
+ g_free (sidebar->details);
+ sidebar->details = NULL;
}
-
- gtk_object_sink (GTK_OBJECT (sidebar->details->title_tab));
-
- g_free (sidebar->details->uri);
- g_free (sidebar->details->default_background_color);
- g_free (sidebar->details->default_background_image);
-
- g_free (sidebar->details);
-
+
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
nautilus_sidebar_theme_changed,
sidebar);