Patch for RPI crash

Yves De Muyter yves at alfavisio.be
Thu Oct 9 01:37:40 PDT 2014


Hello,

Here is a fix for an issue that pops up here when I close a window on a
Raspberry-pi that is using GLES2 to draw contents.
It also reproducible with the clients/simple-egl application by simply
pressing 'esc' on the window (closes the window) or doing 'ctrl-c' on
the terminal. The result is a Weston crash.

What happens is that the buffer is set to NULL while still used.
The patch is against current master.

Signed-off-by: Yves De Muyter <yves at alfavisio.be>

diff --git a/src/rpi-renderer.c b/src/rpi-renderer.c
index c222eb6..d75ff6d 100644
--- a/src/rpi-renderer.c
+++ b/src/rpi-renderer.c
@@ -703,6 +703,9 @@ rpir_view_compute_rects(struct rpir_view *view,
                struct weston_buffer *buffer =
                        view->surface->egl_front->buffer_ref.buffer;
 
+               if( buffer == NULL ){
+                       return -1;
+               }
                src_width = buffer->width << 16;
                src_height = buffer->height << 16;
        } else {








Thanks,

Yves





More information about the wayland-devel mailing list