From cd69ca116385c41ab820ecd204896236b8c6b83a Mon Sep 17 00:00:00 2001 From: Mario Zimmermann Date: Wed, 25 Dec 2024 09:12:30 +0100 Subject: [PATCH] fix gtk crash on module instance delete If the currently focused module instance is being deleted, gtk crashes on `gtk_widget_grab_focus()`. --- src/develop/imageop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/develop/imageop.c b/src/develop/imageop.c index 9b484aeaddc8..3e7114f46b85 100644 --- a/src/develop/imageop.c +++ b/src/develop/imageop.c @@ -532,8 +532,8 @@ static void _gui_delete_callback(GtkButton *button, dt_iop_module_t *module) // we remove the plugin effectively if(!dt_iop_is_hidden(module)) { - dt_iop_gui_cleanup_module(module); gtk_widget_grab_focus(dt_ui_center(darktable.gui->ui)); + dt_iop_gui_cleanup_module(module); } // we remove all references in the history stack and dev->iop