From f4d34edd8cc7e98083414fd58a9c36364302f7c3 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 12 Oct 2018 14:05:58 +0200 Subject: Don't crash when calling QIviSimulationProxy::qt_static_metacall without obj Change-Id: I334aa6a31f69f057635e3e8089098ef2a5eec1d7 Reviewed-by: Robert Griebl --- src/ivicore/qivisimulationproxy.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ivicore/qivisimulationproxy.h b/src/ivicore/qivisimulationproxy.h index 7728596..69ff1cb 100644 --- a/src/ivicore/qivisimulationproxy.h +++ b/src/ivicore/qivisimulationproxy.h @@ -144,7 +144,8 @@ namespace qtivi_private { // as the handler for all static meta calls static void qt_static_metacall(QObject *obj, QMetaObject::Call call, int methodId, void **a) { - Q_UNUSED(obj); + if (!obj) + return; Q_ASSERT_X(m_instance, "qt_static_metacall()", "QIviSimulationProxy::registerInstance needs to be called first"); // As the class acts as a proxy, forward all calls here to the registered instance if (call == QMetaObject::ReadProperty) { -- cgit v1.2.3