Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12499) assertion "t != NULL" failed
Home

[Freeciv-Dev] Re: (PR#12499) assertion "t != NULL" failed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12499) assertion "t != NULL" failed
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 13 Mar 2005 10:06:31 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12499 >

Marko Lindqvist wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12499 >
> 
>   Client asserted when I tried to set timeout from server.
> assertion "t != NULL" failed: file 
> "../../freeciv-patch/utility/timing.c", line 370
> 
>   Previous timeout was 0 and, in case it matters, that particular turn 
> had probably already taken longer than timeout I were changing to.

Here's a patch.

-jason

? data/misc/citybar.png
? data/misc/citybar.spec
Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.217
diff -u -r1.217 civclient.c
--- client/civclient.c  5 Mar 2005 23:51:05 -0000       1.217
+++ client/civclient.c  13 Mar 2005 18:05:44 -0000
@@ -703,7 +703,9 @@
     time_until_next_call = MIN(time_until_next_call, blink_time);
   }
 
-  if (game.timeout > 0) {
+  /* It is possible to have game.timeout > 0 but !turndone_timer, in the
+   * first moments after the timeout is set. */
+  if (game.timeout > 0 && turndone_timer) {
     double seconds = seconds_to_turndone - read_timer_seconds(turndone_timer);
     int iseconds = ceil(seconds) + 0.1; /* Turn should end right on 0. */
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#12499) assertion "t != NULL" failed, Jason Short <=