Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7425) civclient: co
Home

[Freeciv-Dev] Re: (PR#7425) civclient: co

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: martin@xxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7425) civclient: co
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Feb 2004 08:50:43 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7425 >

Martin Schröder wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7425 >
> 
> With HEAD the client can not be started anymore; when connecting to a
> server it crashes with
> civclient: control.c:129: set_unit_focus: Zusicherung »punit == ((void
> *)0)« nicht erfüllt.

Ouch!

The unit focus is being advanced before the game is started.  I 
obviously thought that was impossible.  Surely it's bad?

The advanced patch avoids advancing the unit.  Another possibility is 
just to remove the assert.

jason

Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.127
diff -u -r1.127 control.c
--- client/control.c    2004/02/14 02:01:27     1.127
+++ client/control.c    2004/02/15 16:47:09
@@ -221,6 +221,9 @@
   struct unit *candidate = find_best_focus_candidate(FALSE);
 
   set_hover_state(NULL, HOVER_NONE);
+  if (!can_client_change_view()) {
+    return;
+  }
 
   if(!candidate) {
     /* First try for "waiting" units. */

[Prev in Thread] Current Thread [Next in Thread]