[nautilus] window: explicitly destroy the sidebar in _destroy()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: explicitly destroy the sidebar in _destroy()
- Date: Fri, 2 Dec 2011 21:18:01 +0000 (UTC)
commit 098aa9334123334d500c166f13dc47f5f110cd8a
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 e67d230..bd58cfc 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
@@ -713,8 +715,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]