summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2016-05-24 18:54:38 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-06-03 12:43:55 +0000
commitb3af8f65fcaef66504f5640ccaa2972e17af1af0 (patch)
treecb95299e797ec2097f535bb97a6b1ed43e1b5e92
parentb3aa26a0ff51b29116cfe6b9a2246c9b798f315e (diff)
Android: Fix crash in AndroidCamere::open()
We would attempt to delete the AndroidCameraPrivate object twice if the native call to open failed. On recent version of Android (~6.0), this problem is harder to reproduce, as the camera is properly released when the application goes into the background. Task-number: QTBUG-53536 Change-Id: I064d276f9025924dfdb071aa52311d2b553c6953 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
-rw-r--r--src/plugins/android/src/wrappers/jni/androidcamera.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/android/src/wrappers/jni/androidcamera.cpp b/src/plugins/android/src/wrappers/jni/androidcamera.cpp
index 23200462e..009ab70b9 100644
--- a/src/plugins/android/src/wrappers/jni/androidcamera.cpp
+++ b/src/plugins/android/src/wrappers/jni/androidcamera.cpp
@@ -302,7 +302,6 @@ AndroidCamera *AndroidCamera::open(int cameraId)
if (!ok) {
worker->quit();
worker->wait(5000);
- delete d;
delete worker;
return 0;
}