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
1 changed files with 4 additions and 2 deletions

View File

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