浏览代码

RenderProps: fix null access when lastRenderProps isn't set

lviguier 11 月之前
父节点
当前提交
6dddd3340e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/comp/SceneEditor.hx

+ 1 - 1
hide/comp/SceneEditor.hx

@@ -703,7 +703,7 @@ class RenderPropsPopup extends Popup {
 
 		var fullPath = [];
 		var cur : hrt.prefab.Prefab = lastRenderProps;
-		var renderPropsSource = lastRenderProps.shared.parentPrefab?.source ?? "inline";
+		var renderPropsSource = lastRenderProps?.shared.parentPrefab?.source ?? "inline";
 		renderPropsSource = StringTools.replace(renderPropsSource, "/", "<wbr>/<wbr>");
 		while (cur != null) {
 			fullPath.unshift(cur.getAbsPath());