egl/wayland: verify event queue was allocated
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 22 May 2017 10:07:53 +0000 (11:07 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 22 May 2017 14:44:38 +0000 (15:44 +0100)
We're already verified that 'window' wasn't NULL, I'm guessing this
allocation error is about the newly created queue.

CID: 1409754
Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/egl/drivers/dri2/platform_wayland.c

index 29f64f3a1e6aa14cbabb3c6a0858fba5d349165e..9ad06350048f90d18cbd93905b3baa94e8fb7161 100644 (file)
@@ -147,7 +147,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
 
    dri2_surf->wl_win = window;
    dri2_surf->wl_queue = wl_display_create_queue(dri2_dpy->wl_dpy);
-   if (!window) {
+   if (!dri2_surf->wl_queue) {
       _eglError(EGL_BAD_ALLOC, "dri2_create_surface");
       goto cleanup_surf;
    }