diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-10-09 10:27:51 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-10-12 10:24:15 +0000 |
commit | 3c085ac31bed9ab93ada140ebfd2489ad1921a50 (patch) | |
tree | 02b3904057f658210fb8313f719c891c6e5602e8 /src/hardwareintegration | |
parent | 5966c7dc5be84be3249dd9e4ba3f8520901b4afe (diff) |
Avoid crash on window close
Change-Id: Ic6aad5c0d51b2ae9ee078d3935db3daa642f9b32
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index b7aed26f0..117c5ef80 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -195,8 +195,9 @@ QWaylandSurface::Origin WaylandEglClientBufferIntegration::origin(struct ::wl_re Q_D(const WaylandEglClientBufferIntegration); EGLint isYInverted; - EGLBoolean ret; - ret = d->egl_query_wayland_buffer(d->egl_display, buffer, EGL_WAYLAND_Y_INVERTED_WL, &isYInverted); + EGLBoolean ret = EGL_FALSE; + if (buffer) + ret = d->egl_query_wayland_buffer(d->egl_display, buffer, EGL_WAYLAND_Y_INVERTED_WL, &isYInverted); // Yes, this looks strange, but the specification says that EGL_FALSE return // value (not supported) should be treated the same as EGL_TRUE return value |