From eaa453335563d670d856da44bf4ea1f332c618a7 Mon Sep 17 00:00:00 2001 From: rhyskidd Date: Wed, 30 May 2012 13:26:32 +0000 Subject: Ensure check for NULL pointer occurs prior to use, not after --- Stars45/MsnEditDlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Stars45/MsnEditDlg.cpp') diff --git a/Stars45/MsnEditDlg.cpp b/Stars45/MsnEditDlg.cpp index f81b6c3..ed8f912 100644 --- a/Stars45/MsnEditDlg.cpp +++ b/Stars45/MsnEditDlg.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: MsnEditDlg.cpp @@ -478,10 +478,10 @@ MsnEditDlg::ScrapeForm() Galaxy* galaxy = Galaxy::GetInstance(); StarSystem* system = 0; - if (galaxy) + if (galaxy && cmb_system) system = galaxy->GetSystem(cmb_system->GetSelectedItem()); - if (cmb_system && system) { + if (system) { mission->ClearSystemList(); mission->SetStarSystem(system); -- cgit v1.1