From: curt Date: Sat, 30 Jun 2001 00:27:13 +0000 (+0000) Subject: Fix what looks like it could potentially cause a problem with accessing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9fc9c8d55a8c58252da15929780d519f58ccb9df;p=flightgear.git Fix what looks like it could potentially cause a problem with accessing previously free'd memory. --- diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index b88c5e93e..79b071802 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -722,6 +722,7 @@ void fgCockpitUpdate( void ) { // If these is anything to draw it will. fgUpdateHUD(); } + #define DISPLAY_COUNTER #ifdef DISPLAY_COUNTER else diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index fbaec9b14..06988bf34 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -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;