mirror of https://github.com/GNOME/gimp.git
app: fix a quite-random crash on exit with a race condition.
In some very hard-to-reproduce conditions, I experienced tool_manager_selected_layers_changed() running on an invalid GimpToolManager pointer (because tool_manager_exit() had already run) and therefore segfaulting on quit. Let's make sure we disconnect the signal handler.
This commit is contained in:
parent
68928ac5ab
commit
6d36e38018
|
@ -184,6 +184,11 @@ tool_manager_exit (Gimp *gimp)
|
|||
tool_manager_image_changed,
|
||||
tool_manager);
|
||||
|
||||
if (tool_manager->image)
|
||||
g_signal_handlers_disconnect_by_func (tool_manager->image,
|
||||
tool_manager_selected_layers_changed,
|
||||
tool_manager);
|
||||
|
||||
gimp_container_remove_handler (gimp->images,
|
||||
tool_manager->image_clean_handler_id);
|
||||
gimp_container_remove_handler (gimp->images,
|
||||
|
|
Loading…
Reference in New Issue