]> granicus.if.org Git - python/commitdiff
Don't free the MacOS_Splash() dialog twice...
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 13 May 1997 15:41:48 +0000 (15:41 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 13 May 1997 15:41:48 +0000 (15:41 +0000)
Mac/Modules/macosmodule.c

index 3cf11a0bec6d78dbdc5e5414f89bcec08584a256..bafcab8e9a2394ef3d9e5fc8464043585d6c1ba6 100644 (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);