debian bug 71234 - closing player selection window causes core dump
Too much code was being shared between the extended command window and the popup dialogs for player selection, causing an uninitialized variable to be referenced, often resulting in a core dump.
This commit is contained in:
@@ -59,6 +59,8 @@ win32gui: you couldn't specify an alignment in defaults.nh and have it stick
|
||||
win32gui: allow race/gender/alignment selections beyond those specified in
|
||||
defaults.nh, while still honoring defaults.nh choices
|
||||
unix: don't define errno if NHSTDC
|
||||
X11: avoid a possible crash when using window manger to close a player
|
||||
selection window
|
||||
|
||||
|
||||
General New Features
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "winX.h"
|
||||
|
||||
|
||||
static Widget extended_command_popup;
|
||||
static Widget extended_command_popup = 0;
|
||||
static Widget extended_command_form;
|
||||
static Widget *extended_commands = 0;
|
||||
static int extended_command_selected; /* index of the selected command; */
|
||||
@@ -67,6 +67,7 @@ static const char algn_select_translations[] =
|
||||
"#override\n\
|
||||
<Key>: algn_key()";
|
||||
|
||||
static void FDECL(popup_delete, (Widget, XEvent*, String*, Cardinal*));
|
||||
static void NDECL(ec_dismiss);
|
||||
static Widget FDECL(make_menu, (const char *,const char *,const char *,
|
||||
const char *,XtCallbackProc,
|
||||
@@ -606,7 +607,24 @@ ec_delete(w, event, params, num_params)
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
{
|
||||
ec_dismiss();
|
||||
if (w == extended_command_popup) {
|
||||
ec_dismiss();
|
||||
} else {
|
||||
popup_delete(w, event, params, num_params);
|
||||
}
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
popup_delete(w, event, params, num_params)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
{
|
||||
ps_selected = PS_QUIT;
|
||||
nh_XtPopdown(w);
|
||||
exit_x_event = TRUE; /* leave event loop */
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user