diff options
author | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-10-29 11:24:33 +0100 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-10-30 21:50:58 +0000 |
commit | b347697a9d1e1c4521a10e3243d3eed7ac68a31c (patch) | |
tree | a9975496230dd872b133a7491a9157a342367b68 | |
parent | 25dcc90d799fba3e3f0391783ed07cb22cd1115a (diff) |
winrt: Only destroy existing egl surfaces
Running for instance the widget auto tests reveals a lot of egl warnings
due to items being created and not shown. Hence no surface was created
but tried to be destroyed when window was deleted.
Change-Id: I5c99eeb94a8fc2cfeb98f85445e013de61ff9ca9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtwindow.cpp b/src/plugins/platforms/winrt/qwinrtwindow.cpp index c5b06a5d8a..0d43e76c1a 100644 --- a/src/plugins/platforms/winrt/qwinrtwindow.cpp +++ b/src/plugins/platforms/winrt/qwinrtwindow.cpp @@ -175,6 +175,9 @@ QWinRTWindow::~QWinRTWindow() }); RETURN_VOID_IF_FAILED("Failed to completely destroy window resources, likely because the application is shutting down"); + if (!d->surface) + return; + EGLBoolean value = eglDestroySurface(d->display, d->surface); d->surface = EGL_NO_SURFACE; if (value == EGL_FALSE) |