summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-02-21 21:16:02 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-02-21 21:16:02 +0100
commit7ce2632bfc035257b1f7af80ed8cf1c61af8efaf (patch)
tree448bb5830780a7c5eaef7c5241846c6ad6e4ee32 /src/drivers/Wayland
parente932b94436251fd8b047865bcc0ebce9faf0b51a (diff)
Fix "Wayland: resizing window may crash the program" (#1210)
Diffstat (limited to 'src/drivers/Wayland')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 290d328d8..e922a8153 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1933,7 +1933,9 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) {
wl_subsurface_set_position(fl_win->subsurface, X * f, Y * f);
wl_surface_commit(parent_xid->wl_surface);
} else if (!xid_rect) {
- if (is_a_move) wl_subsurface_set_position(fl_win->subsurface, X * f, Y * f);
+ if (is_a_move && fl_win->subsurface) {
+ wl_subsurface_set_position(fl_win->subsurface, X * f, Y * f);
+ }
wl_surface_commit(parent_xid->wl_surface);
}
}