Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] (PR#14377) client crash
Home

[Freeciv-Dev] (PR#14377) client crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#14377) client crash
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 21 Oct 2005 06:50:51 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Someone forgot to test city investigement when he changed city dialog.
--
mateusz
Index: client/gui-gtk-2.0/happiness.c
===================================================================
--- client/gui-gtk-2.0/happiness.c      (wersja 11161)
+++ client/gui-gtk-2.0/happiness.c      (kopia robocza)
@@ -202,8 +202,13 @@
 void close_happiness_dialog(struct city *pcity)
 {
   struct happiness_dialog *pdialog = get_happiness_dialog(pcity);
+  if (pdialog == NULL) {
+    /* City which is being investigated doesn't contain happiness tab */
+    return;
+  }
 
   gtk_widget_hide(pdialog->shell);
+
   dialog_list_unlink(dialog_list, pdialog);
 
   gtk_widget_destroy(pdialog->shell);
Index: client/gui-gtk-2.0/cma_fe.c
===================================================================
--- client/gui-gtk-2.0/cma_fe.c (wersja 11161)
+++ client/gui-gtk-2.0/cma_fe.c (kopia robocza)
@@ -100,6 +100,10 @@
 {
   struct cma_dialog *pdialog = get_cma_dialog(pcity);
 
+  if (pdialog == NULL) {
+    /* A city which is being investigated doesn't contain cma dialog */
+    return;
+  }
   gtk_widget_destroy(pdialog->shell);
 }
 

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