summaryrefslogtreecommitdiff
path: root/src/gtk/nautilusgtkplacessidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk/nautilusgtkplacessidebar.c')
-rw-r--r--src/gtk/nautilusgtkplacessidebar.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index 193c50d72..cccd24e46 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -4611,11 +4611,7 @@ nautilus_gtk_places_sidebar_set_location (NautilusGtkPlacesSidebar *sidebar,
gtk_list_box_unselect_all (GTK_LIST_BOX (sidebar->list_box));
- if (sidebar->current_location != NULL)
- g_object_unref (sidebar->current_location);
- sidebar->current_location = location;
- if (sidebar->current_location != NULL)
- g_object_ref (sidebar->current_location);
+ g_set_object (&sidebar->current_location, location);
if (location == NULL)
goto out;