Valgrind: Avoid crash when having no configured runnable

Change-Id: Ie4da5712f68176e26aaf5cda1bc1f6cb74899970
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-05-17 14:27:04 +02:00
parent 93ad38da2d
commit 2e7361bb1e

View File

@@ -49,7 +49,8 @@ ValgrindRunControlFactory::ValgrindRunControlFactory(QObject *parent) :
bool ValgrindRunControlFactory::canRun(RunConfiguration *runConfiguration, Core::Id mode) const bool ValgrindRunControlFactory::canRun(RunConfiguration *runConfiguration, Core::Id mode) const
{ {
Q_UNUSED(runConfiguration); if (runConfiguration && !runConfiguration->runnable().is<StandardRunnable>())
return false;
return mode == CALLGRIND_RUN_MODE || mode == MEMCHECK_RUN_MODE || mode == MEMCHECK_WITH_GDB_RUN_MODE; return mode == CALLGRIND_RUN_MODE || mode == MEMCHECK_RUN_MODE || mode == MEMCHECK_WITH_GDB_RUN_MODE;
} }