[nautilus] window: make sure not to unref NULL GFiles
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: make sure not to unref NULL GFiles
- Date: Thu, 8 Sep 2011 19:22:49 +0000 (UTC)
commit ee73c255d75165607c7f04defd5e8edfa3524914
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Sep 8 14:53:45 2011 -0400
window: make sure not to unref NULL GFiles
The GFile pointed by parent here can be NULL after the cycle, so fold
the unref in the != NULL block.
src/nautilus-window-manage-views.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 247f66a..66d47cf 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -712,11 +712,13 @@ begin_location_change (NautilusWindowSlot *slot,
from_folder = parent;
parent = g_file_get_parent (from_folder);
}
+
if (parent != NULL) {
new_selection = g_list_prepend (NULL, nautilus_file_get (from_folder));
+ g_object_unref (parent);
}
+
g_object_unref (from_folder);
- g_object_unref (parent);
}
end_location_change (slot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]