FLTK logo

[branch-1.4] 767e159 - Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error()

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.commit  ]
 
[ Previous Message ] [ Next Message ]

[branch-1.4] 767e159 - Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error() "ManoloFLTK" Aug 07, 2025  
 
commit 767e159ca2784f3c735efa756a8c04933dfd09fe
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Aug 7 19:37:05 2025 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Aug 7 21:30:50 2025 +0200

    Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error()
    
    Backported from master: 0e6c61e6fccd57cea491e1c3f8019cea4ae942b3

 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 50329d1..c791124 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1358,7 +1358,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));
[ Direct Link to Message ]
 
     
[ Previous Message ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.