summaryrefslogtreecommitdiffhomepage
path: root/Stars45/HUDView.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-06-24 18:55:14 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-06-24 18:55:14 +0000
commit88a7e24d44695f49e1250a9314f03bf4c6e1cff8 (patch)
treeb02bac4b5735ede954eb48e0a2cfbead900f1fa5 /Stars45/HUDView.cpp
parent05f1b225a03adeab4cda01a6c96595359464ac0e (diff)
downloadstarshatter-5.1.87.zip
starshatter-5.1.87.tar.gz
starshatter-5.1.87.tar.bz2
A few PVS studio things5.1.87
Diffstat (limited to 'Stars45/HUDView.cpp')
-rw-r--r--Stars45/HUDView.cpp4
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();