diff -r bde641cf53c8 -r e350500c4edb hedgewars/uStore.pas --- a/hedgewars/uStore.pas Thu Apr 04 14:37:19 2013 +0200 +++ b/hedgewars/uStore.pas Tue Jun 04 22:28:12 2013 +0200 @@ -1,6 +1,6 @@ (* * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev + * Copyright (c) 2004-2013 Andrey Korotaev * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -603,19 +603,19 @@ tmpsurf:= IMG_Load_RW(rwopsOpenRead(s), true); if tmpsurf = nil then - begin + begin OutError(msgFailed, (imageFlags and ifCritical) <> 0); exit; - end; + end; if ((imageFlags and ifIgnoreCaps) = 0) and ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then - begin + begin SDL_FreeSurface(tmpsurf); OutError(msgFailedSize, ((not cOnlyStats) and ((imageFlags and ifCritical) <> 0))); // dummy surface to replace non-critical textures that failed to load due to their size LoadImage:= SDL_CreateRGBSurface(SDL_SWSURFACE, 2, 2, 32, RMask, GMask, BMask, AMask); exit; - end; + end; tmpsurf:= doSurfaceConversion(tmpsurf);