[nautilus] pathbar: keep a ref to the GFile while updating the path
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] pathbar: keep a ref to the GFile while updating the path
- Date: Tue, 29 Mar 2011 20:44:18 +0000 (UTC)
commit cf21e9aa47c67861422ada02c7fa327340d63140
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Mar 29 15:49:04 2011 -0400
pathbar: keep a ref to the GFile while updating the path
When desktop-is-home-dir changes, we force a re-layout of all the
buttons, which in turn unrefs the passed-in GFile, as the ref would
belong to an old button. Fix this by assuming a ref while calling
nautilus_path_bar_update_path().
https://bugzilla.gnome.org/show_bug.cgi?id=551543
src/nautilus-pathbar.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index c922565..ec74203 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -137,12 +137,13 @@ update_button_types (NautilusPathBar *path_bar)
ButtonData *button_data;
button_data = BUTTON_DATA (list->data);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_data->button))) {
- path = button_data->path;
+ path = g_object_ref (button_data->path);
break;
}
}
if (path != NULL) {
nautilus_path_bar_update_path (path_bar, path, TRUE);
+ g_object_unref (path);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]