[Freeciv-Dev] Re: client message bug (PR#1951)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Christian Knoke wrote:
CVS 20 AUG 2002 var. patches Gtk+ 1.2
The client crashes, when a message "<city> has been destroyed by ..."
appears in message window, and you click on the popup button.
This has not yet been fixed in GTK, has it?
It also happens in XAW. I would assume it happens in other GUI's as well.
The attached patch fixes the crash in XAW. It still leaves the "Popup
City" button active (disabling it is a GUI issue, AFAICT), but doesn't
actually do the popup if the city can't be found (it may still recenter
the window).
Can anyone test this on other GUIs?
jason
? configure.diff
? debian.diff
? diff
? freeciv-patches.tgz
? gtk2-warnings.diff
? jason-game.gz
? option_callback.diff
? popup_city.diff
? rc
? test.pl
? tileset_switching-3.diff
Index: client/messagewin_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/messagewin_common.c,v
retrieving revision 1.6
diff -u -r1.6 messagewin_common.c
--- client/messagewin_common.c 2002/08/21 21:32:16 1.6
+++ client/messagewin_common.c 2002/09/25 21:01:26
@@ -197,7 +197,14 @@
if (center_when_popup_city) {
center_tile_mapcanvas(x, y);
}
- popup_city_dialog(pcity, 0);
+
+ if (pcity) {
+ /* If the event was the city being destroyed, pcity will be NULL
+ * and we'd better not try to pop it up. In this case, it would
+ * be better if the popup button weren't highlighted at all, but
+ * that's OK. */
+ popup_city_dialog(pcity, 0);
+ }
}
}
- [Freeciv-Dev] Re: client message bug (PR#1951),
Jason Short <=
|
|