Fixed crash when trying to take off from an undefined planet
This commit is contained in:
parent
901622e45c
commit
1fbeccadb1
1 changed files with 4 additions and 2 deletions
|
@ -902,7 +902,8 @@ public class JumpSequencer extends AbstractSequencer {
|
|||
|
||||
case HYPERSPACE_ENTERING: {
|
||||
// anything defined?
|
||||
if (celestialObjectSource.parent == null) {
|
||||
if ( celestialObjectSource == null
|
||||
|| celestialObjectSource.parent == null ) {
|
||||
reason.append(Commons.getStyleWarning(), "warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent",
|
||||
Commons.format(worldSource), worldSource.provider.getDimension());
|
||||
return false;
|
||||
|
@ -927,7 +928,8 @@ public class JumpSequencer extends AbstractSequencer {
|
|||
|
||||
case PLANET_TAKEOFF: {
|
||||
// anything defined?
|
||||
if (celestialObjectSource.parent == null) {
|
||||
if ( celestialObjectSource == null
|
||||
|| celestialObjectSource.parent == null ) {
|
||||
reason.append(Commons.getStyleWarning(), "warpdrive.ship.guide.unable_to_reach_space_no_parent",
|
||||
Commons.format(worldSource), worldSource.provider.getDimension());
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue