[nautilus/gnome-3-2] window: explicitly destroy the sidebar in _destroy()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-2] window: explicitly destroy the sidebar in _destroy()
- Date: Fri, 2 Dec 2011 21:24:15 +0000 (UTC)
commit 3af92d82af54280df73a38855d6ccfe09dbd5709
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Dec 2 16:09:02 2011 -0500
window: explicitly destroy the sidebar in _destroy()
When the nautilus window is destroyed, make sure to explicitly destroy
the sidebar before the panes.
Destroying all the panes can trigger a callback back into the sidebar,
which would then try to access the window pane list from the callback.
The pane list was already destroyed and cleared at that point though,
and we would segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=652320
src/nautilus-window.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 68dc93f..c3a3c2c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -473,8 +473,10 @@ nautilus_window_tear_down_sidebar (NautilusWindow *window)
{
DEBUG ("Destroying sidebar");
- gtk_widget_destroy (GTK_WIDGET (window->details->sidebar));
- window->details->sidebar = NULL;
+ if (window->details->sidebar != NULL) {
+ gtk_widget_destroy (GTK_WIDGET (window->details->sidebar));
+ window->details->sidebar = NULL;
+ }
}
void
@@ -720,8 +722,8 @@ nautilus_window_destroy (GtkWidget *object)
DEBUG ("Destroying window");
- window->details->content_paned = NULL;
- window->details->split_view_hpane = NULL;
+ /* close the sidebar first */
+ nautilus_window_tear_down_sidebar (window);
/* close all panes safely */
panes_copy = g_list_copy (window->details->panes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]