summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-08-07 19:37:05 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-08-07 19:37:05 +0200
commit0e6c61e6fccd57cea491e1c3f8019cea4ae942b3 (patch)
treee4826cc2f52d2955190baf46a373712d9cfc34b6
parent05c678d9e6a7fb18e17ef6d2e1b879c1cd2cf40a (diff)
Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error()
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 1d1f4f10a..ec5faefc7 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1355,7 +1355,8 @@ static void wayland_socket_callback(int fd, struct wl_display *display) {
if (err == EPROTO) {
const struct wl_interface *interface;
int code = wl_display_get_protocol_error(display, &interface, NULL);
- Fl::fatal("Fatal error no %d in Wayland protocol: %s", code, interface->name);
+ Fl::fatal("Fatal error no %d in Wayland protocol: %s", code,
+ (interface ? interface->name : "unknown") );
} else {
Fl::fatal("Fatal error while communicating with the Wayland server: %s",
strerror(errno));