forked from qt-creator/qt-creator
Valgrind: Avoid crash when having no configured runnable
Change-Id: Ie4da5712f68176e26aaf5cda1bc1f6cb74899970 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -49,7 +49,8 @@ ValgrindRunControlFactory::ValgrindRunControlFactory(QObject *parent) :
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user