summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/window.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/clients/window.c b/clients/window.c
index 19519b3c..d59b9c7f 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1653,10 +1653,8 @@ widget_destroy(struct widget *widget)
if (surface->widget == widget && surface->subsurface)
surface_destroy(widget->surface);
- if (widget->tooltip) {
- free(widget->tooltip);
- widget->tooltip = NULL;
- }
+ if (widget->tooltip)
+ widget_destroy_tooltip(widget);
wl_list_for_each(input, &display->input_list, link) {
if (input->focus_widget == widget)