summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2025-03-05 01:41:11 -0500
committerLuke from DC <[email protected]>2025-03-31 05:12:59 +0000
commitefbfc94e8840a5ef36610356b81a9dd456be0c15 (patch)
tree8f2d0bf2157be997e0fe1009facb105414a8fbd1
parented41589e35a534cb47ea7b6dcc685fef2e7ca578 (diff)
downloadcaja-efbfc94e8840a5ef36610356b81a9dd456be0c15.tar.bz2
caja-efbfc94e8840a5ef36610356b81a9dd456be0c15.tar.xz
wayland/window closing: avoid a crash on gtk_widget_destroyHEADmaster
* 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.c5
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)