summaryrefslogtreecommitdiffhomepage
path: root/Stars45/ShipAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/ShipAI.cpp')
-rw-r--r--Stars45/ShipAI.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Stars45/ShipAI.cpp b/Stars45/ShipAI.cpp
index f64f8bc..27e12d3 100644
--- a/Stars45/ShipAI.cpp
+++ b/Stars45/ShipAI.cpp
@@ -1,6 +1,6 @@
/* Project Starshatter 5.0
Destroyer Studios LLC
- Copyright © 1997-2007. All Rights Reserved.
+ Copyright (C) 1997-2007. All Rights Reserved.
SUBSYSTEM: Stars.exe
FILE: ShipAI.cpp
@@ -104,7 +104,8 @@ ShipAI::SetWard(Ship* s)
if (s == ship->GetWard())
return;
- ship->SetWard(s);
+ if (ship)
+ ship->SetWard(s);
Point form = RandomDirection();
form.SwapYZ();