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>
This commit is contained in:
parent
25dcc90d79
commit
b347697a9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user