From 54fe898ff885e31ae069d0b52e076f7b6f6a026e Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Sun, 13 Apr 2014 18:40:19 +0200 Subject: [PATCH] Fix crash when a plugin with a different interface is found --- src/blackcore/context_simulator_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackcore/context_simulator_impl.cpp b/src/blackcore/context_simulator_impl.cpp index ab02a091e..f64404236 100644 --- a/src/blackcore/context_simulator_impl.cpp +++ b/src/blackcore/context_simulator_impl.cpp @@ -92,7 +92,7 @@ namespace BlackCore if (plugin) { ISimulatorFactory *factory = qobject_cast(plugin); - if(plugin) + if(factory) { m_simulator = factory->create(this); connect(m_simulator, SIGNAL(connectionChanged(bool)), this, SLOT(setConnectionStatus(bool)));