Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7475) switching tilesets crashes client
Home

[Freeciv-Dev] Re: (PR#7475) switching tilesets crashes client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7475) switching tilesets crashes client
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 22 Feb 2004 10:10:12 -0800
Reply-to: rt@xxxxxxxxxxx

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

Mike Kaufman wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7475 >
> 
> using the GTK2 client:
> 
> start server.
> 
>>set top 7
> 
> connect client. (I have trident as the default)
> start game
> in client after game's started, switch tileset to isotrident. That works
> fine. then switch back to trident. crash
> 
> also, after this crash, starting the client again and changing to
> isotrident crashes the client, you don't to switch to iso and then back to
> trident first. The two cores appear to be very similar.

My fault.

jason

Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.141
diff -u -r1.141 tilespec.c
--- client/tilespec.c   2004/02/20 15:57:18     1.141
+++ client/tilespec.c   2004/02/22 18:08:45
@@ -292,6 +292,9 @@
     draw = hash_value_by_number(terrain_hash, 0);
     hash_delete_entry(terrain_hash, draw->name);
     free(draw->name);
+    if (draw->mine_tag) {
+      free(draw->mine_tag);
+    }
     free((void *) draw);
   }
   hash_free(terrain_hash);
@@ -697,6 +700,9 @@
                                          terrains[i]);
     terr->mine_tag = secfile_lookup_str_default(file, NULL, "%s.mine_sprite",
                                                terrains[i]);
+    if (terr->mine_tag) {
+      terr->mine_tag = mystrdup(terr->mine_tag);
+    }
 
     if (terr->is_layered && terr->match_type == 0) {
       freelog(LOG_FATAL, "%s is layered but has no matching type set.",

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#7475) switching tilesets crashes client, Jason Short <=