[Freeciv-Dev] (PR#37306) [SDL client] crash without connection to the Internet

2007-03-11 Thread Christian Prochaska

http://bugs.freeciv.org/Ticket/Display.html?id=37306 >

> [dmarks - Fr 02. Mär 2007, 01:02:29]:
> 
> With a recent svn trunk and SDL client on OSX 10.3.9:
> 
> If you're not connected to the Internet when selecting Join Pubserver
> from the main menu, the client will crash with:
> 
> 2: Failed looking up metaserver's host
> connectdlg.c:198: failed assertion `pServer_scan'
> Abort trap
> 
> GDB gives:
> 
> Program received signal SIGABRT, Aborted.
> 0x9004312c in kill ()
> 
>  ~Daniel
> 

Patch attached.

Index: client/gui-sdl/connectdlg.c
===
--- client/gui-sdl/connectdlg.c	(Revision 12773)
+++ client/gui-sdl/connectdlg.c	(Arbeitskopie)
@@ -191,11 +191,13 @@
 
   if (lan) {
 pServer_scan = server_scan_begin(SERVER_SCAN_LOCAL, server_scan_error);  
-} else {
+  } else {
 pServer_scan = server_scan_begin(SERVER_SCAN_GLOBAL, server_scan_error);  
-}
+  }
 
-  assert(pServer_scan);
+  if (!pServer_scan) {
+return NULL;
+  }
   
   SDL_Delay(5000);
 
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#37306) [SDL client] crash without connection to the Internet

2007-03-01 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=37306 >

With a recent svn trunk and SDL client on OSX 10.3.9:

If you're not connected to the Internet when selecting Join Pubserver
from the main menu, the client will crash with:

2: Failed looking up metaserver's host
connectdlg.c:198: failed assertion `pServer_scan'
Abort trap

GDB gives:

Program received signal SIGABRT, Aborted.
0x9004312c in kill ()

 ~Daniel



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev