Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#12144) switching tilesets crashes freeciv
Home

[Freeciv-Dev] (PR#12144) switching tilesets crashes freeciv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12144) switching tilesets crashes freeciv
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 6 Feb 2005 13:37:48 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [jdorje - Sun Feb 06 21:19:40 2005]:
> 
> This affects 2.0 and 2.0.99!  And it's all my fault, my fix for a minor 
> bug introduced this major bug.
> 
> This patch should fix it.

CVS HEAD needs this extra fix. I'll commit it ASAP.

Index: client/gui-gtk-2.0/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v
retrieving revision 1.89
diff -u -r1.89 dialogs.c
--- client/gui-gtk-2.0/dialogs.c        1 Feb 2005 01:08:44 -0000       1.89
+++ client/gui-gtk-2.0/dialogs.c        6 Feb 2005 21:35:03 -0000
@@ -2145,35 +2145,12 @@
   return TRUE;
 }
 
-/**************************************************************************
-...
-**************************************************************************/
-static void nuke_children(gpointer data, gpointer user_data)
-{
-  if (data != user_data) {
-    if (GTK_IS_WINDOW(data) && GTK_WINDOW(data)->type == GTK_WINDOW_TOPLEVEL) {
-      gtk_widget_destroy(data);
-    }
-  }
-}
-
 /********************************************************************** 
   This function is called when the client disconnects or the game is
   over.  It should close all dialog windows for that game.
 ***********************************************************************/
 void popdown_all_game_dialogs(void)
 {
-  GList *res;
-
   gui_dialog_destroy_all();
-
-
-  res = gtk_window_list_toplevels();
-
-  g_list_foreach(res, (GFunc)g_object_ref, NULL);
-  g_list_foreach(res, nuke_children, toplevel);
-  g_list_foreach(res, (GFunc)g_object_unref, NULL);
-
-  g_list_free(res);
 }
 

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