mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Check if the interpreter still exists before trying to acquire the GIL
This commit is contained in:
@@ -6101,14 +6101,14 @@ void sip_api_instance_destroyed(sipSimpleWrapper *sw)
|
||||
*/
|
||||
static void sip_api_instance_destroyed_ex(sipSimpleWrapper **sipSelfp)
|
||||
{
|
||||
SIP_BLOCK_THREADS
|
||||
|
||||
sipSimpleWrapper *sipSelf = *sipSelfp;
|
||||
|
||||
if (sipSelf != NULL && sipInterpreter != NULL)
|
||||
{
|
||||
PyObject *xtype, *xvalue, *xtb;
|
||||
|
||||
SIP_BLOCK_THREADS
|
||||
|
||||
/* We may be tidying up after an exception so preserve it. */
|
||||
PyErr_Fetch(&xtype, &xvalue, &xtb);
|
||||
callPyDtor(sipSelf);
|
||||
@@ -6136,6 +6136,8 @@ static void sip_api_instance_destroyed_ex(sipSimpleWrapper **sipSelfp)
|
||||
{
|
||||
removeFromParent((sipWrapper *)sipSelf);
|
||||
}
|
||||
|
||||
SIP_UNBLOCK_THREADS
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6145,8 +6147,6 @@ static void sip_api_instance_destroyed_ex(sipSimpleWrapper **sipSelfp)
|
||||
* reimplemented virtuals.
|
||||
*/
|
||||
*sipSelfp = NULL;
|
||||
|
||||
SIP_UNBLOCK_THREADS
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user