diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-10-04 15:41:48 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-10-05 08:52:43 +0000 |
commit | ab9f3f089c6f9537ae316697ee151ad63c6618fd (patch) | |
tree | 4d995deda3a46a0737551d0f994d5f915d6a0fe7 | |
parent | 78a57c2e335ba3eb5324275b7a33b4a244488f57 (diff) |
DirectShow: Fix crash when camera destroyed
The lambda function is called even if the object is destroyed.
Task-number: QTBUG-70932
Change-Id: I070059bd61769a6864a2848f2b537609577769de
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/plugins/directshow/camera/dscameracontrol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/directshow/camera/dscameracontrol.cpp b/src/plugins/directshow/camera/dscameracontrol.cpp index 7a2b46a2c..daf104e1c 100644 --- a/src/plugins/directshow/camera/dscameracontrol.cpp +++ b/src/plugins/directshow/camera/dscameracontrol.cpp @@ -51,7 +51,7 @@ DSCameraControl::DSCameraControl(QObject *parent) , m_captureMode(QCamera::CaptureStillImage) { m_session = qobject_cast<DSCameraSession*>(parent); - connect(m_session, &DSCameraSession::statusChanged, + connect(m_session, &DSCameraSession::statusChanged, this, [&](QCamera::Status status) { if (status == QCamera::UnloadedStatus) m_state = QCamera::UnloadedState; |