|
@@ -118,10 +118,11 @@ var MenubarEdit = function ( editor ) {
|
|
|
|
|
|
var object = editor.selected;
|
|
|
|
|
|
- var parent = object.parent;
|
|
|
- if ( parent === undefined ) return; // avoid deleting the camera or scene
|
|
|
+ if ( object !== null && object.parent !== null ) {
|
|
|
|
|
|
- editor.execute( new RemoveObjectCommand( editor, object ) );
|
|
|
+ editor.execute( new RemoveObjectCommand( editor, object ) );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
} );
|
|
|
options.add( option );
|