Explorar o código

Clear the internal d-pointer on reseting ctkServiceRegistration

Sascha Zelzer %!s(int64=14) %!d(string=hai) anos
pai
achega
75746a8287
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Libs/PluginFramework/ctkServiceRegistration.cpp

+ 3 - 0
Libs/PluginFramework/ctkServiceRegistration.cpp

@@ -68,7 +68,10 @@ ctkServiceRegistration& ctkServiceRegistration::operator=(int null)
   if (null == 0)
   {
     if (d_func() && !d_func()->ref.deref())
+    {
       delete d_ptr;
+    }
+    d_ptr = 0;
   }
   return *this;
 }