stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/map map_fog.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/map map_fog.c
Date: 27 Jan 2004 09:01:00 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/27 09:01:00

Modified files:
        src/map        : map_fog.c 

Log message:
        Fixed Potential crash when double freeing Fog

Patches:
Index: stratagus/src/map/map_fog.c
diff -u stratagus/src/map/map_fog.c:1.146 stratagus/src/map/map_fog.c:1.147
--- stratagus/src/map/map_fog.c:1.146   Wed Jan 21 05:41:59 2004
+++ stratagus/src/map/map_fog.c Tue Jan 27 09:00:59 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: map_fog.c,v 1.146 2004/01/20 18:41:59 nobody_ Exp $
+//      $Id: map_fog.c,v 1.147 2004/01/26 22:00:59 wizzard Exp $
 
 //@{
 
@@ -1019,7 +1019,10 @@
                VisibleTable = NULL;
        }
 #ifndef OPENGL
-       SDL_FreeSurface(OnlyFogSurface);
+       if (OnlyFogSurface) {
+               SDL_FreeSurface(OnlyFogSurface);
+               OnlyFogSurface = NULL;
+       }
 #endif
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]