From 78f628e0af2f2df562c40ac1424b432b6a969055 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:06:28 +0100 Subject: cleanup und bugfixes after refactoring --- src/executableslist.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/executableslist.cpp') diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 11158c5b..c46cea10 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -72,18 +72,20 @@ ExecutablesList::~ExecutablesList() void ExecutablesList::init(IPluginGame *game) { + Q_ASSERT(game != nullptr); m_Executables.clear(); for (const ExecutableInfo &info : game->executables()) { - addExecutableInternal(info.title(), - info.binary().absoluteFilePath(), - info.arguments().join(" "), - info.workingDirectory().absolutePath(), - info.closeMO(), - info.steamAppID()); + if (info.isValid()) { + addExecutableInternal(info.title(), + info.binary().absoluteFilePath(), + info.arguments().join(" "), + info.workingDirectory().absolutePath(), + info.closeMO(), + info.steamAppID()); + } } } - void ExecutablesList::getExecutables(std::vector::iterator &begin, std::vector::iterator &end) { begin = m_Executables.begin(); -- cgit v1.3.1