summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2013-12-03 14:52:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-03 18:42:05 +0100
commitae8948a0a9ed94962604918c32757518f562b271 (patch)
tree4ea8b60e4872ce32f0598cf6fa1032bfa87b9fe6 /src/3rdparty
parent4f2471b8ccd936463a63fc1f6063d06e91635505 (diff)
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 <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/angle/src/libEGL/Surface.cpp14
1 files changed, 12 insertions, 2 deletions
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;