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

> [EMAIL PROTECTED] - Fr 25. Jan 2008, 21:37:06]:
> 
> Version:  Freeciv 2.1.2
> 
> Client crash bug 1: (SDL, Untested in GTK)
>     When trying to bribe an enemy unit, the client asks amount and
> after
> clicking yes, the client crashes.  This has been earlier identified as
> a bug
> that happens when the window is closed and then information is
> retreived from
> the window without checking if it still exists.  This was fixed for
> GTK 2.1.0,
> but appears not to have been fixed for SDL 2.1.2.
> 

Actually it's still the same crash that you reported in PR#39716 a while
ago. The backport of the patch to S2_1 was unfortunately incomplete. Fix
attached.

Index: client/gui-sdl/diplomat_dialog.c
===================================================================
--- client/gui-sdl/diplomat_dialog.c	(revision 14320)
+++ client/gui-sdl/diplomat_dialog.c	(working copy)
@@ -1308,8 +1308,8 @@
 static int diplomat_bribe_yes_callback(struct widget *pWidget)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
-    if (game_find_unit_by_number(pIncite_Dlg->diplomat_id)
-       && game_find_unit_by_number(pIncite_Dlg->diplomat_target_id)) {  
+    if (game_find_unit_by_number(pBribe_Dlg->diplomat_id)
+       && game_find_unit_by_number(pBribe_Dlg->diplomat_target_id)) {  
        request_diplomat_action(DIPLOMAT_BRIBE, pBribe_Dlg->diplomat_id,
                                           pBribe_Dlg->diplomat_target_id, 0);       
     }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to