mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
When calling -.cxx_dealloc, look up the superclass before calling. This method
may destroy the receiver's class, if it's a user-generated one, so we can't guarantee that it is valid after the call. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33701 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
59469c7860
commit
8d699f6ff8
1 changed files with 3 additions and 2 deletions
|
@ -1436,12 +1436,13 @@ static id gs_weak_load(id obj)
|
|||
|
||||
newDestructor
|
||||
= class_getMethodImplementation(destructorClass, cxx_destruct);
|
||||
destructorClass = class_getSuperclass(destructorClass);
|
||||
|
||||
if (newDestructor != destructor)
|
||||
{
|
||||
newDestructor(self, cxx_destruct);
|
||||
destructor = newDestructor;
|
||||
}
|
||||
destructorClass = class_getSuperclass(destructorClass);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue