1
0
Fork 0

Updated bug fix to make hopefully more thread safe.

This commit is contained in:
curt 2001-07-02 22:11:56 +00:00
parent b985e348da
commit 5d2855f1ec

View file

@ -939,8 +939,13 @@ void fgHUDalphaInit( void ) {
void fgHUDReshape(void) {
if ( HUDtext ) {
delete HUDtext;
// this chunk of code is not necessarily thread safe if the
// compiler optimizer reorders these statements. Note that
// "delete ptr" does not set "ptr = NULL". We have to do that
// ourselves.
fntRenderer *tmp = HUDtext;
HUDtext = NULL;
delete tmp;
}
HUD_TextSize = fgGetInt("/sim/startup/xsize") / 60;