Skip to content

Commit

Permalink
imp board: don't crash when deleting poylgons
Browse files Browse the repository at this point in the history
got introduced by 31c757d
  • Loading branch information
carrotIndustries committed Sep 14, 2023
1 parent 91be718 commit 89a03c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/imp/imp_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Plane *>(poly.usage.ptr))
return true;
Expand Down

0 comments on commit 89a03c5

Please sign in to comment.