Fix crash when setting map connection to "None"

This commit is contained in:
BigBahss
2020-10-14 15:28:44 -04:00
committed by huderlem
parent 18cb48f806
commit 89e3ef16b4

View File

@@ -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);