Free cached ammo menu tex on quit.
authornemo
Mon, 13 Jan 2014 14:40:06 -0500
changeset 9983 1b62d993cd2f
parent 9981 94f5e5cd151b
child 9985 42cd42e44c9a
Free cached ammo menu tex on quit.
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Mon Jan 13 23:07:27 2014 +0400
+++ b/hedgewars/uWorld.pas	Mon Jan 13 14:40:06 2014 -0500
@@ -409,6 +409,9 @@
     missionTex:= nil;
     FreeTexture(recTexture);
     recTexture:= nil;
+    FreeTexture(AmmoMenuTex);
+    AmmoMenuInvalidated:= true;
+    AmmoMenuTex:= nil;
 end;
 
 function GetAmmoMenuTexture(Ammo: PHHAmmo): PTexture;
@@ -2042,6 +2045,8 @@
     WorldEnd[2].a:= 255;
     WorldEnd[3].a:= 255;
 
+    AmmoMenuTex:= nil;
+    AmmoMenuInvalidated:= true
 end;
 
 procedure freeModule;