Skip to content

Commit

Permalink
Fixed crash when right clicking to cancel a transport before selectin…
Browse files Browse the repository at this point in the history
…g a target.
  • Loading branch information
Xilmi committed Dec 27, 2021
1 parent ab0c1d9 commit 6659a55
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/rotp/ui/main/TransportDeploymentPanel.java
Expand Up @@ -196,9 +196,12 @@ private boolean canSendTransports() {
}
@Override
public void cancel() {
transportSprite().cancel();
parentSpritePanel.parent.clickedSprite(transportSprite().homeSystem());
parentSpritePanel.parent.repaint();
if(transportSprite() != null)
{
transportSprite().cancel();
parentSpritePanel.parent.clickedSprite(transportSprite().homeSystem());
parentSpritePanel.parent.repaint();
}
}
public void clearTransport() {
transportSprite().clear();
Expand Down

0 comments on commit 6659a55

Please sign in to comment.