mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fixed very nasty null-dereferencing bug in DisposeControl/destroy
object.
This commit is contained in:
parent
cc778ebd62
commit
cfb60ee1e8
4 changed files with 42 additions and 35 deletions
|
@ -69,7 +69,7 @@ class MyObjectDefinition(GlobalObjectDefinition):
|
|||
GlobalObjectDefinition.outputInitStructMembers(self)
|
||||
Output("SetCRefCon(itself, (long)it);")
|
||||
def outputCleanupStructMembers(self):
|
||||
Output("SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */")
|
||||
Output("if (self->ob_itself) SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */")
|
||||
|
||||
# Create the generator groups and link them
|
||||
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue