hedgewars/uStore.pas
changeset 2285 6746bda385e8
parent 2284 bd091b6b128d
child 2290 bf87ca44782e
--- a/hedgewars/uStore.pas	Tue Jul 28 16:29:39 2009 +0000
+++ b/hedgewars/uStore.pas	Tue Jul 28 22:04:04 2009 +0000
@@ -973,7 +973,8 @@
 procedure SetScale(f: GLfloat);
 begin
 cScaleFactor:= f;
-cWaterSprCount:= 1 + round(cScreenWidth * 2 / cScaleFactor / SpritesData[sprWater].Width);
+if SpritesData[sprWater].Width <> 0 then
+    cWaterSprCount:= 1 + round(cScreenWidth * 2 / cScaleFactor / SpritesData[sprWater].Width);
 
 glLoadIdentity;
 glViewport(0, 0, cScreenWidth, cScreenHeight);