Squashed some NPE

This commit is contained in:
fgnm
2022-12-08 11:54:36 +01:00
parent 665b2e9432
commit 0274057c3d
2 changed files with 2 additions and 0 deletions
@@ -112,6 +112,7 @@ public class PolygonTool extends SelectionTool implements PolygonTransformationL
Set<Integer> selectedEntities = sandbox.getSelector().getSelectedItems();
for(int entity: selectedEntities) {
BasicFollower follower = followersUIMediator.getFollower(entity);
if (follower == null) continue;
follower.update();
follower.removeSubFollower(PolygonFollower.class);
PolygonFollower meshFollower = new PolygonFollower(entity);
@@ -112,6 +112,7 @@ public class TagsPanelMediator extends Mediator<TagsPanel> {
while (iterator.hasNext()) {
entity = iterator.next();
mainItemComponent = SandboxComponentRetriever.get(entity, MainItemComponent.class);
if (mainItemComponent == null) continue;
toRetain.clear();
for (String tag : mainItemComponent.tags)
toRetain.add(tag);