From b347697a9d1e1c4521a10e3243d3eed7ac68a31c Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Thu, 29 Oct 2015 11:24:33 +0100 Subject: 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 Reviewed-by: Andrew Knight --- src/plugins/platforms/winrt/qwinrtwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/platforms') 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) -- cgit v1.2.3