Fix crash on idle status change with 64 bit architectures.

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>
This commit is contained in:
Andrew den Exter
2013-04-17 15:13:56 +10:00
committed by The Qt Project
parent e728a61eb6
commit 63f0fcb5d6

View 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;