summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-05-22 17:46:08 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-05-22 17:46:08 +0200
commit4c057c57ae499b2fb458159bb33b678372169206 (patch)
tree243846b183a3208b4123eabadc448a66e097df36 /src
parent7020356df90630b93cf6be49681cc1547057f2ae (diff)
Slightly improve Fl_Wayland_Window_Driver::flush()
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 3630ab06e..52c5fd7eb 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -399,7 +399,11 @@ void Fl_Wayland_Window_Driver::flush() {
Fl_Wayland_Window_Driver::in_flush_ = true;
Fl_Window_Driver::flush();
Fl_Wayland_Window_Driver::in_flush_ = false;
- if (window->buffer->cb) wl_callback_destroy(window->buffer->cb);
+ if (window->buffer->cb) {
+ wl_callback_destroy(window->buffer->cb);
+ window->buffer->cb = NULL;
+ r = NULL;
+ }
Fl_Wayland_Graphics_Driver::buffer_commit(window, r);
}