diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-04-17 14:30:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-17 14:30:41 +0200 |
| commit | ff912b5f6199ade55a4eaff1c8e7eefb8145c970 (patch) | |
| tree | c6bcf4c6c4eff90f53572fe1cc27bd4c9d255f93 /src/profile.cpp | |
| parent | 4621c271642906d13fffaed83e1033da09abe20d (diff) | |
| parent | 89ee58de38d46361dbdd5f9b5a2d1390cf325ab4 (diff) | |
Merge pull request #1053 from Al12rs/fix_no_inis
Fix crash when game plugin does not provide any ini files.
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index 19c0d750..e96f6702 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -881,7 +881,11 @@ QString Profile::getDeleterFileName() const QString Profile::getIniFileName() const { - return m_Directory.absoluteFilePath(m_GamePlugin->iniFiles()[0]); + auto iniFiles = m_GamePlugin->iniFiles(); + if (iniFiles.isEmpty()) + return ""; + else + return m_Directory.absoluteFilePath(iniFiles[0]); } QString Profile::getProfileTweaks() const |
