]> git.mxchange.org Git - flightgear.git/commitdiff
Fix what looks like it could potentially cause a problem with accessing
authorcurt <curt>
Sat, 30 Jun 2001 00:27:13 +0000 (00:27 +0000)
committercurt <curt>
Sat, 30 Jun 2001 00:27:13 +0000 (00:27 +0000)
previously free'd memory.

src/Cockpit/cockpit.cxx
src/Cockpit/hud.cxx

index b88c5e93e5d3df82256528815438ffe5a1954ee4..79b071802f3df33682ffaabbc59468ca7a011286 100644 (file)
@@ -722,6 +722,7 @@ void fgCockpitUpdate( void ) {
         // If these is anything to draw it will.
         fgUpdateHUD();
     }
+
 #define DISPLAY_COUNTER
 #ifdef DISPLAY_COUNTER
     else
index fbaec9b14e3f8b0bf6012c82e91f190cc82b03b0..06988bf34b037093af7b84b6870ae5ef46693b3e 100644 (file)
@@ -938,8 +938,10 @@ void fgHUDalphaInit( void ) {
 
 
 void fgHUDReshape(void) {
-    if ( HUDtext )
+    if ( HUDtext ) {
         delete HUDtext;
+        HUDtext = NULL;
+    }
 
     HUD_TextSize = fgGetInt("/sim/startup/xsize") / 60;
     HUD_TextSize = 10;