From 89e3ef16b4975f920e2fec9229a058e4a93feaef Mon Sep 17 00:00:00 2001 From: BigBahss Date: Wed, 14 Oct 2020 15:28:44 -0400 Subject: [PATCH] Fix crash when setting map connection to "None" --- src/editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor.cpp b/src/editor.cpp index 1345adb6..2c7ad55c 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -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);