--- a/hedgewars/CCHandlers.inc Mon Dec 01 14:24:17 2008 +0000
+++ b/hedgewars/CCHandlers.inc Thu Dec 04 21:14:03 2008 +0000
@@ -481,7 +481,7 @@
{$IFDEF DEBUGFILE}
AddFileLog('Freeing old primary surface...');
{$ENDIF}
-SDL_FreeSurface(SDLPrimSurface);
+if SDLPrimSurface <> nil then SDL_FreeSurface(SDLPrimSurface);
SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags);
SDLTry(SDLPrimSurface <> nil, true);
--- a/hedgewars/uStore.pas Mon Dec 01 14:24:17 2008 +0000
+++ b/hedgewars/uStore.pas Thu Dec 04 21:14:03 2008 +0000
@@ -45,8 +45,8 @@
function LoadImage(const filename: string; hasAlpha, critical, setTransparent: boolean): PSDL_Surface;
procedure SetupOpenGL;
-var PixelFormat: PSDL_PixelFormat;
- SDLPrimSurface: PSDL_Surface;
+var PixelFormat: PSDL_PixelFormat = nil;
+ SDLPrimSurface: PSDL_Surface = nil;
PauseTexture,
ConfirmTexture: PTexture;