hedgewars/uStore.pas
changeset 759 8da05b316d81
parent 756 2b307457fd68
child 761 63ae90011a52
--- a/hedgewars/uStore.pas	Sat Jan 26 10:21:43 2008 +0000
+++ b/hedgewars/uStore.pas	Sat Jan 26 10:55:34 2008 +0000
@@ -300,6 +300,7 @@
 var rr: TSDL_Rect;
     t, b: real;
 begin
+if SourceTexture^.h = 0 then exit;
 rr.x:= X;
 rr.y:= Y;
 rr.w:= r^.w;
@@ -434,7 +435,7 @@
 var ii: TSprite;
 begin
 for ii:= Low(TSprite) to High(TSprite) do
-    glDeleteTextures(1, @SpritesData[ii].Texture);
+    FreeTexture(SpritesData[ii].Texture);
 SDL_FreeSurface(  HHSurface  );
 SDL_FreeSurface(LandSurface  )
 end;