[editor only] Fix NPE while editing vertices

This commit is contained in:
fgnm
2022-01-16 20:11:23 +01:00
parent 4f3616c2f3
commit b1fc45eafd
@@ -46,7 +46,8 @@ public class UpdatePolygonVerticesCommand extends EntityModifyRevertibleCommand
//Force TextureRegionComponent refresh to immediately update follower size and position
TextureRegionComponent textureRegionComponent = SandboxComponentRetriever.get(entity, TextureRegionComponent.class);
textureRegionComponent.executeRefresh(entity);
if (textureRegionComponent != null)
textureRegionComponent.executeRefresh(entity);
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);