summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nautilus-files-view.c6
-rw-r--r--src/nautilus-window-slot.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 427ac08c5..5573701cc 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -776,8 +776,7 @@ real_set_extensions_background_menu (NautilusView *view,
priv = nautilus_files_view_get_instance_private (NAUTILUS_FILES_VIEW (view));
- g_clear_object (&priv->extensions_background_menu);
- priv->extensions_background_menu = menu;
+ g_set_object (&priv->extensions_background_menu, menu);
}
static void
@@ -790,8 +789,7 @@ real_set_templates_menu (NautilusView *view,
priv = nautilus_files_view_get_instance_private (NAUTILUS_FILES_VIEW (view));
- g_clear_object (&priv->templates_menu);
- priv->templates_menu = menu;
+ g_set_object (&priv->templates_menu, menu);
}
static gboolean
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index ee15f4c68..7fe24f09c 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -769,7 +769,7 @@ real_set_extensions_background_menu (NautilusWindowSlot *self,
NautilusWindowSlotPrivate *priv;
priv = nautilus_window_slot_get_instance_private (self);
- priv->extensions_background_menu = menu != NULL ? g_object_ref (menu) : NULL;
+ g_set_object (&priv->extensions_background_menu, menu);
}
static void
@@ -779,7 +779,7 @@ real_set_templates_menu (NautilusWindowSlot *self,
NautilusWindowSlotPrivate *priv;
priv = nautilus_window_slot_get_instance_private (self);
- priv->templates_menu = menu != NULL ? g_object_ref (menu) : NULL;
+ g_set_object (&priv->templates_menu, menu);
}
static void