Commit 313f05df authored by Ernestas Kulik's avatar Ernestas Kulik

entry: Add parent check when removing

Otherwise we might start poking around unset data.
parent a2a16b3e
Pipeline #19271 passed with stage
in 5 minutes 58 seconds
......@@ -278,12 +278,17 @@ void
nautilus_tagged_entry_remove_tag (NautilusTaggedEntry *self,
NautilusTaggedEntryTag *tag)
{
GtkWidget *parent;
gpointer data;
unsigned long handler_id;
g_return_if_fail (NAUTILUS_IS_TAGGED_ENTRY (self));
g_return_if_fail (NAUTILUS_IS_TAGGED_ENTRY_TAG (tag));
parent = gtk_widget_get_parent (GTK_WIDGET (tag));
g_return_if_fail (parent != GTK_WIDGET (self));
data = g_object_get_data (G_OBJECT (tag), "clicked-handler-id");
handler_id = GPOINTER_TO_UINT (data);
g_signal_handler_disconnect (tag, handler_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