diff options
Diffstat (limited to 'Stars45/HUDView.cpp')
-rw-r--r-- | Stars45/HUDView.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Stars45/HUDView.cpp b/Stars45/HUDView.cpp index 48953ac..5edda65 100644 --- a/Stars45/HUDView.cpp +++ b/Stars45/HUDView.cpp @@ -959,6 +959,10 @@ HUDView::DrawContactMarkers() // draw life bars on targeted ship:
if (target && target->Type() == SimObject::SIM_SHIP && target->Rep()) {
Ship* tgt_ship = (Ship*) target;
+ if (tgt_ship == nullptr) {
+ Print(" Null Pointer in HUDView::DrawContactMarkers(). Please investigate.");
+ return;
+ }
Graphic* g = tgt_ship->Rep();
Rect r = g->ScreenRect();
|