egl/wayland: Return -1 from get_back_bo to indicate error
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 10 Dec 2013 00:13:35 +0000 (16:13 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 10 Dec 2013 00:14:33 +0000 (16:14 -0800)
A return value of -1 indicate failure to allocate the back buffer and
means we don't segfault on the way out.

src/egl/drivers/dri2/platform_wayland.c

index e24ad9dac6e548f388aff97816dd8317d2e56bc5..5c8440db88584e7ed28eb5a2ca4b25cb2b59c5e2 100644 (file)
@@ -278,7 +278,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
    while (dri2_surf->throttle_callback != NULL)
       if (wl_display_dispatch_queue(dri2_dpy->wl_dpy,
                                     dri2_dpy->wl_queue) == -1)
-         return EGL_FALSE;
+         return -1;
 
    if (dri2_surf->back == NULL) {
       for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {