tFix for a bug encountered when a player drops drugs and is then chased by the … | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ccef0a7db6522f200043885179d6ea349edc228d | |
parent cfcd93e53df69e6bb0806d59cf6c404a347bfbbb | |
Author: Ben Webb <[email protected]> | |
Date: Wed, 5 Feb 2003 15:47:45 +0000 | |
Fix for a bug encountered when a player drops drugs and is then chased by | |
tthe cops - destroy dialogs etc. -before- sending network messages, as these | |
messages (when in single player mode) could trigger immediate responses. | |
Diffstat: | |
M ChangeLog | 2 ++ | |
M src/gui_client/gtk_client.c | 11 ++++++----- | |
2 files changed, 8 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/ChangeLog b/ChangeLog | |
t@@ -3,6 +3,8 @@ cvs | |
+ and - keys | |
- The curses client now makes better use of space with screen sizes | |
larger than 80x24 | |
+ - Fix for a crash encountered if you drop drugs and then encounter | |
+ the cops | |
1.5.8 21-10-2002 | |
- Options dialog now allows sounds for all supported game events to be set | |
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c | |
t@@ -834,12 +834,12 @@ static void FightCallback(GtkWidget *widget, gpointer da… | |
case 'D': | |
gtk_widget_hide(FightDialog); | |
if (!(Play->Flags & FIGHTING)) { | |
- if (HaveAbility(Play, A_DONEFIGHT)) { | |
- SendClientMessage(Play, C_NONE, C_DONE, NULL, NULL); | |
- } | |
FreeCombatants(); | |
gtk_widget_destroy(FightDialog); | |
FightDialog = NULL; | |
+ if (HaveAbility(Play, A_DONEFIGHT)) { | |
+ SendClientMessage(Play, C_NONE, C_DONE, NULL, NULL); | |
+ } | |
} | |
break; | |
case 'R': | |
t@@ -1583,10 +1583,11 @@ static void DealOKCallback(GtkWidget *widget, gpointer… | |
text = g_strdup_printf("drug^%d^%d", DealDialog.DrugInd, | |
data == BT_BUY ? amount : -amount); | |
- SendClientMessage(ClientData.Play, C_NONE, C_BUYOBJECT, NULL, text); | |
- g_free(text); | |
gtk_widget_destroy(DealDialog.dialog); | |
+ | |
+ SendClientMessage(ClientData.Play, C_NONE, C_BUYOBJECT, NULL, text); | |
+ g_free(text); | |
} | |
void DealDrugs(GtkWidget *widget, gpointer data) |