summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/macosmodule.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-05-13 15:41:48 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-05-13 15:41:48 (GMT)
commit450ae9f352d0ce77726b5b95ff31a80b0d75a457 (patch)
treea4efd20395e178cbc10cfb18873310304e3a993f /Mac/Modules/macosmodule.c
parent48c5527c789da0d09869a60b26320db3b4fcdd0a (diff)
downloadcpython-450ae9f352d0ce77726b5b95ff31a80b0d75a457.zip
cpython-450ae9f352d0ce77726b5b95ff31a80b0d75a457.tar.gz
cpython-450ae9f352d0ce77726b5b95ff31a80b0d75a457.tar.bz2
Don't free the MacOS_Splash() dialog twice...
Diffstat (limited to 'Mac/Modules/macosmodule.c')
-rw-r--r--Mac/Modules/macosmodule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index 3cf11a0..bafcab8 100644
--- a/Mac/Modules/macosmodule.c
+++ b/Mac/Modules/macosmodule.c
@@ -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);