From 88a7e24d44695f49e1250a9314f03bf4c6e1cff8 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Sun, 24 Jun 2012 18:55:14 +0000 Subject: A few PVS studio things --- Stars45/HUDView.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Stars45/HUDView.cpp') 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(); -- cgit v1.1