r142: *** empty log message ***
[ctsim.git] / libctgraphics / sgp.cpp
index cc87671d0c45388327cba801bc1c69b2a0cce518..8a5400fc00e620ffbbc802a558a1ed2dd47afe98 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.cpp,v 1.3 2000/06/19 19:16:17 kevin Exp $
+**  $Id: sgp.cpp,v 1.4 2000/07/11 10:32:44 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -84,12 +84,13 @@ void
 sgp2_close (SGP_ID gid)
 {
 #if HAVE_G2_H    
+  if (gid)
     g2_close (gid->g2_id);
 #endif
-    if (gid == _sgp2_cwin)
-       _sgp2_cwin = NULL;
+  if (gid == _sgp2_cwin)
+    _sgp2_cwin = NULL;
 
-    delete gid;
+  delete gid;
 }
 
 void