[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeciv-dev
Subject:    [Freeciv-Dev] (PR#36863) [SDL client] win32 cities report crash
From:       "Christian Prochaska" <cp.ml.freeciv.dev () domain ! hid>
Date:       2007-02-25 21:55:34
Message-ID: 200702252155.l1PLtYqX008619 () domain ! hid
[Download RAW message or body]

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

> [dmarks - So 25. Feb 2007, 07:32:50]:
> 
> On WinXP with 2.1.0-beta3 SDL build.
> 
> When clicking the 'buy production' shortcut (xxx turns) the client
> crashes with:
> 
> File:citydlg.c
> Line:1234
> Expression: pSellected_Widget != NULL
> 
> Not reproducible on my Mac OSX 10.3 system; instead it shows "Sorry,
> You have already bought here in this turn" which is BTW not correct,
> since this is the very first turn of the game and I have only just
> founded the first city.
> 
>  ~Daniel
> 
> 

Patch attached.


["pr36863-2007-02-25.diff" (text/x-patch)]

Index: client/gui-sdl/cityrep.c
===================================================================
--- client/gui-sdl/cityrep.c	(Revision 12699)
+++ client/gui-sdl/cityrep.c	(Arbeitskopie)
@@ -553,8 +553,10 @@
     prod_w = MAX(prod_w, pBuf->size.w);
     add_to_gui_list(MAX_ID - pCity->id, pBuf);
     pBuf->data.city = pCity;
-    set_wstate(pBuf, FC_WS_NORMAL);
     pBuf->action = popup_buy_production_from_city_report_callback;
+    if (!pCity->did_buy) {
+      set_wstate(pBuf, FC_WS_NORMAL);    
+    }
     
     count += COL;
     area.h += (hh + adj_size(2));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic