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

> [EMAIL PROTECTED] - Di 20. Mär 2007, 19:37:48]:
> 
> Hi!
> 
> In the most recent testgame we found out that when you attempt
> to sell a building the game opens two sell dialogs (one in the
> center and one on top left of the screen). The center one is
> completely inresponsive and the top left one crashes the game
> if clicked.
> 
> We were able to reproduce this bug.
> 
> The building we attempted to sell was The Aqueduct, if it matters.
> The city in question had two other buildings, the City Wall and
> the Palace.
> 
> Regards,
> Lauri Uotinen
> 

The duplication problem is already fixed in the development version, but
it still crashed when clicking the "Sell" button. Patch for S2_1 and
trunk attached.

Index: client/gui-sdl/citydlg.c
===================================================================
--- client/gui-sdl/citydlg.c	(Revision 12860)
+++ client/gui-sdl/citydlg.c	(Arbeitskopie)
@@ -1334,8 +1334,8 @@
     
     /* popdown, we don't redraw and flush becouse this is make by redraw city dlg.
        when response from server come */
-    del_group_of_widgets_from_gui_list(pCityDlg->pBeginCityMenuWidgetList,
-                                       pCityDlg->pEndCityMenuWidgetList);
+    popdown_window_group_dialog(pCityDlg->pBeginCityMenuWidgetList,
+                                pCityDlg->pEndCityMenuWidgetList);
   
     pCityDlg->pEndCityMenuWidgetList = NULL;
   
@@ -1362,7 +1362,7 @@
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
     struct SDL_String16 *pStr = NULL;
-    struct widget *pLabel = pImpr;
+    struct widget *pLabel = NULL;
     struct widget *pWindow = NULL;
     struct widget *pCancel_Button = NULL;
     struct widget *pOK_Button = NULL;
@@ -1407,7 +1407,7 @@
     /* create ok button */
     pOK_Button = create_themeicon_button_from_chars(
                   pTheme->Small_OK_Icon, pWindow->dst, _("Sell"), adj_font(10),  0);
-    pOK_Button->data.ptr = (void *)pLabel;
+    pOK_Button->data.ptr = (void *)pImpr;
     pOK_Button->size.w = pCancel_Button->size.w;
     pOK_Button->action = sell_imprvm_dlg_ok_callback;
     pOK_Button->key = SDLK_RETURN;
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to