From 59f20906d9d6d7bc33069fc0960c59edf0e232e1 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 28 Jun 2016 10:16:40 +0200 Subject: [PATCH] winrt: Do not assert when missing region of interest Asserting is too heavy and can cause false positive on devices like the Lumia 535, where focus is supported, but not setting a focus point. Later on we check for existence of the control during the initialization, so it is safe to continue here. Task-number: QTBUG-54278 Change-Id: Ie68ff754d742888bdd6f4047e07d207707c90c91 Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- src/plugins/winrt/qwinrtcameracontrol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp index f11a975b..73ae4b06 100644 --- a/src/plugins/winrt/qwinrtcameracontrol.cpp +++ b/src/plugins/winrt/qwinrtcameracontrol.cpp @@ -942,7 +942,8 @@ HRESULT QWinRTCameraControl::initialize() Q_ASSERT_SUCCEEDED(hr); if (isFocusSupported) { hr = advancedVideoDeviceController->get_RegionsOfInterestControl(&d->regionsOfInterestControl); - Q_ASSERT_SUCCEEDED(hr); + if (FAILED(hr)) + qCDebug(lcMMCamera) << "Focus supported, but no control for regions of interest available"; hr = initializeFocus(); Q_ASSERT_SUCCEEDED(hr); } else {