mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-22 08:36:06 -05:00
Fix crash when adding first MAPSEC define
This commit is contained in:
@@ -2357,7 +2357,7 @@ bool Project::addNewMapsec(const QString &idName, const QString &displayName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->mapSectionIdNamesSaveOrder.last() == getEmptyMapsecName()) {
|
||||
if (!this->mapSectionIdNamesSaveOrder.isEmpty() && this->mapSectionIdNamesSaveOrder.last() == getEmptyMapsecName()) {
|
||||
// If the default map section name (MAPSEC_NONE) is last in the list we'll keep it last in the list.
|
||||
this->mapSectionIdNamesSaveOrder.insert(this->mapSectionIdNames.length() - 1, idName);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user