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>
This commit is contained in:
Christian Strømme
2016-05-24 18:54:38 +02:00
committed by Yoann Lopes
parent b3aa26a0ff
commit b3af8f65fc

View File

@@ -302,7 +302,6 @@ AndroidCamera *AndroidCamera::open(int cameraId)
if (!ok) { if (!ok) {
worker->quit(); worker->quit();
worker->wait(5000); worker->wait(5000);
delete d;
delete worker; delete worker;
return 0; return 0;
} }