LibCore: Remove unnecessary or invalid write after child remove
This commit is contained in:
parent
561e011e07
commit
e1598233e1
1 changed files with 3 additions and 1 deletions
|
|
@ -134,7 +134,9 @@ public:
|
|||
{
|
||||
if (m_parent)
|
||||
m_parent->remove_child(*this);
|
||||
m_parent = nullptr;
|
||||
|
||||
// The call to `remove_child` may have deleted the object.
|
||||
// Do not dereference `this` from this point forward.
|
||||
}
|
||||
|
||||
template<class T, class... Args>
|
||||
|
|
|
|||
Loading…
Reference in a new issue