summaryrefslogtreecommitdiff
path: root/platform/linux
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-04-05 15:57:14 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-04-05 23:05:46 +0200
commit7c69cfa6de6e09f096ce27e437b4e2ca0b9bc35a (patch)
tree9c9c87cd1644225abeb51b476602fadb20bf7c58 /platform/linux
parent038062af860e38a313dad585c64526cd5183df24 (diff)
downloadqtlocation-mapboxgl-7c69cfa6de6e09f096ce27e437b4e2ca0b9bc35a.tar.gz
[core] destroy surface before context in EGL backend
Diffstat (limited to 'platform/linux')
-rw-r--r--platform/linux/src/headless_backend_egl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/linux/src/headless_backend_egl.cpp b/platform/linux/src/headless_backend_egl.cpp
index 696fa3065c..cfe82d3ccc 100644
--- a/platform/linux/src/headless_backend_egl.cpp
+++ b/platform/linux/src/headless_backend_egl.cpp
@@ -31,15 +31,15 @@ struct EGLImpl : public HeadlessBackend::Impl {
}
~EGLImpl() {
- if (!eglDestroyContext(display, glContext)) {
- throw std::runtime_error("Failed to destroy EGL context.\n");
- }
if (glSurface != EGL_NO_SURFACE) {
if (!eglDestroySurface(display, glSurface)) {
- throw std::runtime_error("Failed to destroy EGL context.\n");
+ throw std::runtime_error("Failed to destroy EGL surface.\n");
}
glSurface = EGL_NO_SURFACE;
}
+ if (!eglDestroyContext(display, glContext)) {
+ throw std::runtime_error("Failed to destroy EGL context.\n");
+ }
}
void activateContext() final {