hedgewars/uIO.pas
changeset 11507 bd9a2f1b0080
parent 11483 dbc0d54798dc
child 11532 bf86c6cb9341
--- a/hedgewars/uIO.pas	Wed Jan 13 16:19:50 2016 +0100
+++ b/hedgewars/uIO.pas	Sun Jan 10 00:45:13 2016 +0300
@@ -114,16 +114,16 @@
 var ipaddr: TIPAddress;
 begin
     WriteToConsole('Init SDL_Net... ');
-    SDLTry(SDLNet_Init = 0, 'SDLNet_Init', true);
+    SDLCheck(SDLNet_Init = 0, 'SDLNet_Init', true);
     fds:= SDLNet_AllocSocketSet(1);
-    SDLTry(fds <> nil, 'SDLNet_AllocSocketSet', true);
+    SDLCheck(fds <> nil, 'SDLNet_AllocSocketSet', true);
     WriteLnToConsole(msgOK);
     WriteToConsole('Establishing IPC connection to tcp 127.0.0.1:' + IntToStr(ipcPort) + ' ');
     {$HINTS OFF}
-    SDLTry(SDLNet_ResolveHost(ipaddr, PChar('127.0.0.1'), ipcPort) = 0, 'SDLNet_ResolveHost', true);
+    SDLCheck(SDLNet_ResolveHost(ipaddr, PChar('127.0.0.1'), ipcPort) = 0, 'SDLNet_ResolveHost', true);
     {$HINTS ON}
     IPCSock:= SDLNet_TCP_Open(ipaddr);
-    SDLTry(IPCSock <> nil, 'SDLNet_TCP_Open', true);
+    SDLCheck(IPCSock <> nil, 'SDLNet_TCP_Open', true);
     WriteLnToConsole(msgOK)
 end;
 
@@ -512,6 +512,7 @@
     RegisterVariable('fatal', @chFatalError, true );
 
     IPCSock:= nil;
+    fds:= nil;
 
     headcmd:= nil;
     lastcmd:= nil;