From 89a03c56dbf4b8cad1a80fe3a53269e0e108a09b Mon Sep 17 00:00:00 2001 From: "Lukas K." Date: Thu, 14 Sep 2023 22:09:30 +0200 Subject: [PATCH] imp board: don't crash when deleting poylgons got introduced by 31c757ddc7e9d9127eb8a079c58ec7635bc82947 --- src/imp/imp_board.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/imp/imp_board.cpp b/src/imp/imp_board.cpp index 009cc7b4..9db8c2c6 100644 --- a/src/imp/imp_board.cpp +++ b/src/imp/imp_board.cpp @@ -315,6 +315,8 @@ void ImpBoard::update_action_sensitivity() case ObjectType::POLYGON_ARC_CENTER: case ObjectType::POLYGON_VERTEX: case ObjectType::POLYGON_EDGE: { + if (!core_board.get_board()->polygons.count(x.uuid)) + return false; const auto &poly = *core_board.get_polygon(x.uuid); if (auto plane = dynamic_cast(poly.usage.ptr)) return true;