ソースを参照

Added missing null pointer check.

Sascha Zelzer 14 年 前
コミット
dd0963c234
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      Libs/PluginFramework/ctkServiceRegistration.cpp

+ 1 - 1
Libs/PluginFramework/ctkServiceRegistration.cpp

@@ -44,7 +44,7 @@ ctkServiceRegistration::ctkServiceRegistration()
 ctkServiceRegistration::ctkServiceRegistration(const ctkServiceRegistration& reg)
   : d_ptr(reg.d_ptr)
 {
-  d_func()->ref.ref();
+  if (d_func()) d_func()->ref.ref();
 }
 
 //----------------------------------------------------------------------------