Fix crash on idle status change with 64 bit architectures.
authorAndrew den Exter <andrew.den.exter@jollamobile.com>
Wed, 17 Apr 2013 05:13:56 +0000 (15:13 +1000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 17 Apr 2013 08:09:07 +0000 (10:09 +0200)
bool and gboolean are not necessarily the same size on all
architectures, and if gboolean is larger than bool then passing it
as an argument to g_object_get can trash the stack.  In this case
overwriting some of the session pointer.

Change-Id: Iaa7be6a327e9f69212bd7d5bb372d33f2026db0f
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
src/plugins/gstreamer/camerabin/camerabinsession.cpp

index f58bea2..2e5c53a 100644 (file)
@@ -672,7 +672,7 @@ void CameraBinSession::updateBusyStatus(GObject *o, GParamSpec *p, gpointer d)
     Q_UNUSED(p);
     CameraBinSession *session = reinterpret_cast<CameraBinSession *>(d);
 
-    bool idle = false;
+    gboolean idle = false;
     g_object_get(o, "idle", &idle, NULL);
     bool busy = !idle;