From 1d20f0069c4bbd7213609a355a727af3172d9b20 Mon Sep 17 00:00:00 2001 From: Iurie Nistor Date: Fri, 16 Feb 2024 12:11:43 +0200 Subject: [PATCH] Don't access the interface from the ~RkObjectImpl --- src/redkite/src/RkObjectImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redkite/src/RkObjectImpl.cpp b/src/redkite/src/RkObjectImpl.cpp index c5b926c..47b4459 100644 --- a/src/redkite/src/RkObjectImpl.cpp +++ b/src/redkite/src/RkObjectImpl.cpp @@ -52,8 +52,8 @@ RkObject::RkObjectImpl::~RkObjectImpl() observersList.clear(); // Remove myself from the paren object. - if (inf_ptr->parent()) - inf_ptr->parent()->removeChild(inf_ptr); + if (parent()) + parent()->removeChild(inf_ptr); } void RkObject::RkObjectImpl::removeChildrens()