Просмотр исходного кода

Clear the internal d-pointer on reseting ctkServiceRegistration

Sascha Zelzer лет назад: 14
Родитель
Сommit
75746a8287
1 измененных файлов с 3 добавлено и 0 удалено
  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 (null == 0)
   {
   {
     if (d_func() && !d_func()->ref.deref())
     if (d_func() && !d_func()->ref.deref())
+    {
       delete d_ptr;
       delete d_ptr;
+    }
+    d_ptr = 0;
   }
   }
   return *this;
   return *this;
 }
 }