summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-12 21:28:03 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-12 21:28:03 +0100
commit7dd7cfcf953a01f13c378bd110964ce1c4dc82a6 (patch)
tree249b428d3b5d44943adcd958bf5c0b23cdc2f97b /src/drivers
parent66860c2e83c01fafa8c9a1a699c5e8eee2bf9dff (diff)
Wayland Fix "Error "heap-use-after-free" when scaling twice" (#650)
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index a62bce6d2..2edc4a66e 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -477,9 +477,10 @@ void Fl_Wayland_Window_Driver::hide() {
wl_list_remove(&window_output->link);
free(window_output);
}
+ if (Fl_Wayland_Window_Driver::wld_window == wld_win) Fl_Wayland_Window_Driver::wld_window = NULL;
//fprintf(stderr, "After hide: sub=%p frame=%p xdg=%p top=%p pop=%p surf=%p\n", wld_win->subsurface, wld_win->frame, wld_win->xdg_surface, wld_win->xdg_toplevel, wld_win->xdg_popup, wld_win->wl_surface);
+ free(wld_win);
}
- free(wld_win);
if (pWindow->as_gl_window() && in_flush) {
ip->xid = 0;
ip->next = NULL; // to end the loop in calling Fl::flush()