<div dir="ltr">This patch follows Andreas' work on PROTOs, and may conflict with it.  This is likely a fairly harmless patch.  This patch may not be needed.   Let me know when the patch is applied, or if it isn't, so I can remove my backups.<div><br></div><div>John<br><div><br></div><div>diff --git a/src/nodes/Core/X3DNode.js b/src/nodes/Core/X3DNode.js<br>index b3658510..408df60b 100644<br>--- a/src/nodes/Core/X3DNode.js<br>+++ b/src/nodes/Core/X3DNode.js<br>@@ -76,7 +76,7 @@ x3dom.registerNodeType(<br><br>             addChild : function ( node, containerFieldName )<br>             {<br>-                if ( "isProtoInstance" in node )<br>+                if ( node !== null && "isProtoInstance" in node )<br>                 {<br>                     this.addChild( node.typeNode, containerFieldName );<br>                     if ( node.helperNodes.length > 0 )<br>@@ -125,19 +125,19 @@ x3dom.registerNodeType(<br>                     {<br>                         node._parentNodes.push( this );<br>                         this._childNodes.push( node );<br>-                        if ( !( "isProtoInstance" in this ) )<br>+                        if ( this !== null && !( "isProtoInstance" in this ) )<br>                         {<br>                             node.parentAdded( this );<br>                         }<br>                         return true;<br>                     }<br>-                    else if ( "isProtoInstance" in this )<br>+                    else if ( this !== null && "isProtoInstance" in this )<br>                     {<br>                         //child is not a field value, parent is protobody<br>                         //so child is "root node" of protobody<br>                         //and constitutes its nodes<br>                         //transfer nodes directly<br>-                        if ( "isProtoInstance" in node )<br>+                        if ( node !== null && "isProtoInstance" in node )<br>                         {<br>                             this.nodes.concat( node.nodes );<br>                         }<br></div></div></div>