hedgewars/uLandObjects.pas
changeset 11507 bd9a2f1b0080
parent 11362 ed5a6478e710
child 11532 bf86c6cb9341
--- a/hedgewars/uLandObjects.pas	Wed Jan 13 16:19:50 2016 +0100
+++ b/hedgewars/uLandObjects.pas	Sun Jan 10 00:45:13 2016 +0300
@@ -109,7 +109,7 @@
 WriteToConsole('Generating collision info... ');
 
 if SDL_MustLock(Image) then
-    SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
+    if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit;
 
 bpp:= Image^.format^.BytesPerPixel;
 TryDo(bpp = 4, 'Land object should be 32bit', true);
@@ -160,7 +160,7 @@
 WriteToConsole('Generating collision info... ');
 
 if SDL_MustLock(Image) then
-    SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
+    if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit;
 
 bpp:= Image^.format^.BytesPerPixel;
 TryDo(bpp = 4, 'Land object should be 32bit', true);