Fixed very nasty null-dereferencing bug in DisposeControl/destroy

object.
This commit is contained in:
Jack Jansen 1996-10-01 10:46:46 +00:00
parent cc778ebd62
commit cfb60ee1e8
4 changed files with 42 additions and 35 deletions

View file

@ -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)