Don't free the MacOS_Splash() dialog twice...

This commit is contained in:
Jack Jansen 1997-05-13 15:41:48 +00:00
parent 48c5527c78
commit 450ae9f352

View file

@ -502,15 +502,17 @@ static PyObject *
MacOS_splash(PyObject *self, PyObject *args) MacOS_splash(PyObject *self, PyObject *args)
{ {
int resid = -1; int resid = -1;
static DialogPtr curdialog; static DialogPtr curdialog = NULL;
WindowRef theWindow; WindowRef theWindow;
CGrafPtr thePort; CGrafPtr thePort;
short xpos, ypos, width, height, swidth, sheight; short xpos, ypos, width, height, swidth, sheight;
if (!PyArg_ParseTuple(args, "|i", &resid)) if (!PyArg_ParseTuple(args, "|i", &resid))
return NULL; return NULL;
if (curdialog) if (curdialog) {
DisposeDialog(curdialog); DisposeDialog(curdialog);
curdialog = NULL;
}
if ( resid != -1 ) { if ( resid != -1 ) {
curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1); curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);