瀏覽代碼

Added error message if trying to clone an unparented node.

Lasse Öörni 13 年之前
父節點
當前提交
d262ed3f3d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Engine/Scene/Node.cpp

+ 3 - 0
Engine/Scene/Node.cpp

@@ -632,7 +632,10 @@ Node* Node::Clone(CreateMode mode)
 {
 {
     // The scene itself can not be cloned
     // The scene itself can not be cloned
     if (this == scene_ || !parent_)
     if (this == scene_ || !parent_)
+    {
+        LOGERROR("Can not clone node without a parent");
         return 0;
         return 0;
+    }
     
     
     PROFILE(CloneNode);
     PROFILE(CloneNode);