Fix crash when setting map connection to "None"
This commit is contained in:
parent
18cb48f806
commit
89e3ef16b4
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue