summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-07-31 19:26:37 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-07-31 19:26:37 +0200
commite12eb99b5dc272f0d11eda4be60e5198430b4c4f (patch)
treed520d00b82ffdad515e0dfc9248296b247f88dc7 /src/drivers
parent7feddabd24976f90bc950e50c9eb167056359816 (diff)
Wayland: add test to avoid null pointer dereferencing
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index de39645c0..ba35d2920 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1341,7 +1341,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
if (pWindow->modal() || pWindow->non_modal()) {
if (pWindow->modal()) Fl::modal_ = pWindow;
if (new_window->kind == DECORATED && first_xid && first_xid->kind == DECORATED) {
- libdecor_frame_set_parent(new_window->frame, first_xid->frame);
+ if (first_xid->frame) libdecor_frame_set_parent(new_window->frame, first_xid->frame);
} else if (new_window->kind == UNFRAMED && new_window->xdg_toplevel && first_xid) {
Fl_Wayland_Window_Driver *top_dr = Fl_Wayland_Window_Driver::driver(first_xid->fl_win);
if (top_dr->xdg_toplevel()) xdg_toplevel_set_parent(new_window->xdg_toplevel,