浏览代码

Clear the internal d-pointer on reseting ctkServiceRegistration

Sascha Zelzer 14 年之前
父节点
当前提交
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 (d_func() && !d_func()->ref.deref())
+    {
       delete d_ptr;
+    }
+    d_ptr = 0;
   }
   return *this;
 }