diff options
author | Piotr Srebrny <piotr.srebrny@qt.io> | 2021-09-03 22:08:53 +0200 |
---|---|---|
committer | Piotr Srebrny <piotr.srebrny@qt.io> | 2021-09-06 08:36:19 +0000 |
commit | 3eef3a20e9e7aa16f85074f95c581d01ac763721 (patch) | |
tree | 31cabd2f20c71f2e5d4d4ab3769c80bebbb68210 /src/multimedia | |
parent | a35cf397e4653505ec8d3f8dc09c2a6a9d27c3cd (diff) |
Check correct pointer before calling a method on it
Pick-to: 6.2
Change-Id: Ic55dc6f5465b56339e86f1c6644dfb91c7abcab9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/camera/qimagecapture.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/camera/qimagecapture.cpp b/src/multimedia/camera/qimagecapture.cpp index 8ec2b7d1f..eedb7ecbb 100644 --- a/src/multimedia/camera/qimagecapture.cpp +++ b/src/multimedia/camera/qimagecapture.cpp @@ -168,7 +168,7 @@ QImageCapture::~QImageCapture() */ bool QImageCapture::isAvailable() const { - return d_func()->control != nullptr && d_func()->captureSession->camera(); + return d_func()->captureSession && d_func()->captureSession->camera(); } /*! |