Fix possible NPE with Selection Tool
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.3 KiB |
@@ -445,7 +445,8 @@ public class SelectionTool extends SimpleTool {
|
||||
dragStartPositions.clear();
|
||||
for (Entity itemInstance : sandbox.getSelector().getCurrentSelection()) {
|
||||
transformComponent = ComponentRetriever.get(itemInstance, TransformComponent.class);
|
||||
dragStartPositions.put(itemInstance, new Vector2(transformComponent.x, transformComponent.y));
|
||||
if (transformComponent != null)
|
||||
dragStartPositions.put(itemInstance, new Vector2(transformComponent.x, transformComponent.y));
|
||||
}
|
||||
|
||||
if (keycode == Input.Keys.UP) {
|
||||
|
||||
Reference in New Issue
Block a user