diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-10-12 14:05:58 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-10-25 19:57:46 +0000 |
commit | f4d34edd8cc7e98083414fd58a9c36364302f7c3 (patch) | |
tree | 35285019aca96a1a7272f00619815b128f002f5a | |
parent | e51c9d592c477ba8ae18b3360517fdd8abf848df (diff) | |
download | qtivi-f4d34edd8cc7e98083414fd58a9c36364302f7c3.tar.gz |
Don't crash when calling QIviSimulationProxy::qt_static_metacall without obj
Change-Id: I334aa6a31f69f057635e3e8089098ef2a5eec1d7
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | src/ivicore/qivisimulationproxy.h | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |