diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-04-05 15:57:14 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-04-05 23:05:46 +0200 |
commit | 7c69cfa6de6e09f096ce27e437b4e2ca0b9bc35a (patch) | |
tree | 9c9c87cd1644225abeb51b476602fadb20bf7c58 /platform/linux | |
parent | 038062af860e38a313dad585c64526cd5183df24 (diff) | |
download | qtlocation-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.cpp | 8 |
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 { |