From ae8948a0a9ed94962604918c32757518f562b271 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 3 Dec 2013 14:52:18 +0100 Subject: ANGLE D3D11: Always execute QueryInterface ASSERT removes the condition when building for release mode. However, QueryInterface must be called in any case. Adopt to using ASSERT(false) like in other occurrences in angle. This is a follow-up patch to 331bc16afd23414493b842819e0b747e8f364243 Change-Id: I4413bab06b5a529fcbd09bbc20828fcdcf4e4fc6 Reviewed-by: Friedemann Kleint Reviewed-by: Andrew Knight --- src/3rdparty/angle/src/libEGL/Surface.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/3rdparty/angle/src') diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp index ee8d4800ae..dbff159d0e 100644 --- a/src/3rdparty/angle/src/libEGL/Surface.cpp +++ b/src/3rdparty/angle/src/libEGL/Surface.cpp @@ -118,7 +118,12 @@ bool Surface::resetSwapChain() #else ABI::Windows::Foundation::Rect windowRect; ABI::Windows::UI::Core::ICoreWindow *window; - ASSERT(SUCCEEDED(mWindow->QueryInterface(IID_PPV_ARGS(&window)))); + HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window)); + if (FAILED(result)) + { + ASSERT(false); + return false; + } window->get_Bounds(&windowRect); width = windowRect.Width; height = windowRect.Height; @@ -342,7 +347,12 @@ bool Surface::checkForOutOfDateSwapChain() #else ABI::Windows::Foundation::Rect windowRect; ABI::Windows::UI::Core::ICoreWindow *window; - ASSERT(SUCCEEDED(mWindow->QueryInterface(IID_PPV_ARGS(&window)))); + HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window)); + if (FAILED(result)) + { + ASSERT(false); + return false; + } window->get_Bounds(&windowRect); int clientWidth = windowRect.Width; int clientHeight = windowRect.Height; -- cgit v1.2.3