Commit 8b90c790 authored by Matthias Clasen's avatar Matthias Clasen

places sidebar: Fix memory handling of rename popover

We were freeing the same string twice here, leading to
parent 94bcdd32
......@@ -2435,7 +2435,7 @@ show_rename_popover (GtkSidebarRow *row)
if (sidebar->rename_uri)
g_free (sidebar->rename_uri);
sidebar->rename_uri = uri;
sidebar->rename_uri = g_strdup (uri);
gtk_entry_set_text (GTK_ENTRY (sidebar->rename_entry), name);
gtk_popover_set_relative_to (GTK_POPOVER (sidebar->rename_popover), GTK_WIDGET (row));
......@@ -3942,6 +3942,15 @@ gtk_places_sidebar_dispose (GObject *object)
sidebar->popup_menu = NULL;
if (sidebar->rename_popover)
gtk_widget_destroy (sidebar->rename_popover);
sidebar->rename_popover = NULL;
sidebar->rename_entry = NULL;
sidebar->rename_button = NULL;
sidebar->rename_error = NULL;
if (sidebar->trash_monitor)
g_signal_handler_disconnect (sidebar->trash_monitor, sidebar->trash_monitor_changed_id);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment