From 1ca767eb13f2027a1a2c21f68346ff1d7339ff86 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:49:15 +0200 Subject: [PATCH] Hybrid Wayland/X11 : more accurate writing of fl_wl_display(). --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index cd512350b..cdfc88e80 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1465,6 +1465,7 @@ void Fl_Wayland_Screen_Driver::reset_spot() { } -struct wl_display *fl_wl_display() { +struct wl_display *fl_wl_display() { + if (!Fl_Wayland_Screen_Driver::wl_display || !Fl_Wayland_Screen_Driver::wl_registry) return NULL; return Fl_Wayland_Screen_Driver::wl_display; }