diff options
author | lukefromdc <[email protected]> | 2025-03-05 01:41:11 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2025-05-27 01:22:34 -0400 |
commit | b47d27d70a7acefae83b83c012fc4b2471d3b65f (patch) | |
tree | 2a43fc8e9eb1c505c7bb9c77d6a3ecc4a6c8810f | |
parent | 598e2f8a112c4c6c34244b997b788e70c0f17183 (diff) | |
download | caja-b47d27d70a7acefae83b83c012fc4b2471d3b65f.tar.bz2 caja-b47d27d70a7acefae83b83c012fc4b2471d3b65f.tar.xz |
wayland/window closing: avoid a crash on gtk_widget_destroy
* Do not attempt to unref or destroy a child of a container
*In GTK 3 at least, GtkContainers automatically destroy child widgets when destroyed
-rw-r--r-- | libcaja-private/caja-icon-container.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 4c4c084c..d30add27 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -4416,7 +4416,10 @@ destroy (GtkWidget *object) /* destroy interactive search dialog */ if (container->details->search_window) { - gtk_widget_destroy (container->details->search_window); + /*current GTK docs do not advise calling gtk_widget_destroy on child widgets + *gtk_widget_destroy (container->details->search_window); + *also note that GtkContainer destroys it's child widgets when it is destroyed + */ container->details->search_window = NULL; container->details->search_entry = NULL; if (container->details->typeselect_flush_timeout) |