summaryrefslogtreecommitdiff
path: root/src/executableslist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/executableslist.cpp')
-rw-r--r--src/executableslist.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/executableslist.cpp b/src/executableslist.cpp
index 7fd228d0..25b6bb0f 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<Executable>::iterator &begin, std::vector<Executable>::iterator &end)
{
begin = m_Executables.begin();