diff options
author | lukefromdc <[email protected]> | 2025-03-05 01:41:11 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2025-03-05 02:46:18 -0500 |
commit | 8a1b0dd663f12300f95670b68b0ae72e5e3e7e23 (patch) | |
tree | 8f2d0bf2157be997e0fe1009facb105414a8fbd1 /libcaja-private/caja-icon-container.c | |
parent | ed41589e35a534cb47ea7b6dcc685fef2e7ca578 (diff) | |
download | caja-wl-close-wayland-simplified.tar.bz2 caja-wl-close-wayland-simplified.tar.xz |
wayland/window closing: avoid a crash on gtk_widget_destroywl-close-wayland-simplified
* Do not attempt to unref or destroy a child of a container
*In GTK 3 at least, GtkContainers automatically destroy child widgets when destroyed
Diffstat (limited to 'libcaja-private/caja-icon-container.c')
-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) |