trethaller 7 年之前
父节点
当前提交
d7b7fddfeb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hide/prefab/fx/Emitter.hx

+ 2 - 0
hide/prefab/fx/Emitter.hx

@@ -761,6 +761,8 @@ class Emitter extends Object3D {
 
 
 	override function setSelected( ctx : Context, b : Bool ) {
 	override function setSelected( ctx : Context, b : Bool ) {
 		var emitterObj = Std.instance(ctx.local3d, EmitterObject);
 		var emitterObj = Std.instance(ctx.local3d, EmitterObject);
+		if(emitterObj == null)
+			return;
 		var debugShape : h3d.scene.Object = emitterObj.find(c -> if(c.name == "_highlight") c else null);
 		var debugShape : h3d.scene.Object = emitterObj.find(c -> if(c.name == "_highlight") c else null);
 		if(debugShape != null)
 		if(debugShape != null)
 			debugShape.visible = b;		
 			debugShape.visible = b;