mirror of
https://github.com/python/cpython.git
synced 2025-11-08 05:39:34 +00:00
Don't free the MacOS_Splash() dialog twice...
This commit is contained in:
parent
48c5527c78
commit
450ae9f352
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue