mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 20:05:55 -05:00
Fix crash when setting map connection to "None"
This commit is contained in:
@@ -1593,7 +1593,7 @@ void Editor::setConnectionMap(QString mapName) {
|
||||
if (!selected_connection_item)
|
||||
return;
|
||||
|
||||
if (mapName.isEmpty()) {
|
||||
if (mapName.isEmpty() || mapName == NONE_MAP_NAME) {
|
||||
removeCurrentConnection();
|
||||
return;
|
||||
}
|
||||
@@ -1744,7 +1744,7 @@ void Editor::updateDiveEmergeMap(QString mapName, QString direction) {
|
||||
}
|
||||
}
|
||||
|
||||
if (mapName.isEmpty()) {
|
||||
if (mapName.isEmpty() || mapName == NONE_MAP_NAME) {
|
||||
// Remove dive/emerge connection
|
||||
if (connection) {
|
||||
map->connections.removeOne(connection);
|
||||
|
||||
Reference in New Issue
Block a user