]> git.mxchange.org Git - simgear.git/blobdiff - PUI/puInterface.cxx
More portability changes to help with windoze compilation problems.
[simgear.git] / PUI / puInterface.cxx
index 4b996845c8e760dc3d6a993d92cc53d46984fefd..500f829713423d1dc830cb508894c3889067d176 100644 (file)
@@ -253,10 +253,15 @@ void puInterface::doHit ( int, int, int, int )
 
 puInterface::~puInterface ()
 {
-  puPopLiveInterface () ;
+    puPopLiveInterface () ;
 
-  for ( puObject *bo = dlist ; bo != NULL ; bo = bo->next )
-    delete bo ;
+    puObject *bo = dlist ;
+
+    while ( bo != NULL ) {
+       puObject *tmp_bo = bo->next ;
+       delete bo ;
+       bo = tmp_bo ;
+    }
 }