Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13352) Client SEGFAULT on Help Units
Home

[Freeciv-Dev] (PR#13352) Client SEGFAULT on Help Units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13352) Client SEGFAULT on Help Units
From: "White Raven" <whraven@xxxxxxxxxxxxxxxx>
Date: Mon, 27 Jun 2005 12:55:23 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Using the CVS of June 27, GTK-2.0 version, the client crashes when
trying to display the Unit Help for Engineers.  This occurs with any
unit that has the "Settlers" flag set.  The source of the problem
appears to be a change in tech.c whereby the player->research struct is
now used instead of the full player struct.  the get_player_research
call segfaults when a NULL pointer is used, which is the case when
text_with_flags_string in helpdata.c calls it.  The patch below fixes
the call in helpdata.c.

--- ./client/helpdata.c.orig    2005-06-27 14:28:30.284230496 -0500
+++ ./client/helpdata.c 2005-06-27 14:30:57.011858779 -0500
@@ -723,7 +723,7 @@
   assert(bufsz > 0);
   buf[0] = '\0';
   techs_with_flag_iterate(flag, tech_id) {
-    const char *name = get_tech_name(NULL, tech_id);
+    const char *name = get_tech_name(game.player_ptr, tech_id);
  
     if (buf[0] == '\0') {
       cat_snprintf(buf, bufsz, "%s", name);





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13352) Client SEGFAULT on Help Units, White Raven <=