diff options
| author | Tannin <devnull@localhost> | 2014-11-28 11:06:28 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-28 11:06:28 +0100 |
| commit | 78f628e0af2f2df562c40ac1424b432b6a969055 (patch) | |
| tree | 294c461fc858aa9d13fa65c37fd3517db4554f2a /src/executableslist.cpp | |
| parent | 45a46778fb9c7195cb09fbba4a2c502dca6bca13 (diff) | |
cleanup und bugfixes after refactoring
Diffstat (limited to 'src/executableslist.cpp')
| -rw-r--r-- | src/executableslist.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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<Executable>::iterator &begin, std::vector<Executable>::iterator &end)
{
begin = m_Executables.begin();
|
