mirror of https://github.com/GNOME/gimp.git
Bug 793815 - segmentation fault on a handler using finalized user data.
The bug is very hard to reproduce, probably because it requires specific timing conditions but this looks like this commit would prevent it. Apparently the signal handler gimp_container_view_name_changed() may have been run while the container view (set as user data) was most likely already finalized, hence leaving an invalid dangling pointer. Let's just make sure we disconnect this handler (and another) when we finalize the container view and its private data.
This commit is contained in:
parent
479b7e31d0
commit
b671a43a31
|
@ -290,6 +290,10 @@ gimp_container_view_private_finalize (GimpContainerViewPrivate *private)
|
|||
g_hash_table_destroy (private->item_hash);
|
||||
private->item_hash = NULL;
|
||||
}
|
||||
g_clear_pointer (&private->name_changed_handler,
|
||||
gimp_tree_handler_disconnect);
|
||||
g_clear_pointer (&private->expanded_changed_handler,
|
||||
gimp_tree_handler_disconnect);
|
||||
|
||||
g_slice_free (GimpContainerViewPrivate, private);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue