浏览代码

Merge pull request #105797 from bruvzg/scroll_crash

Fix `AnimationNodeBlendTree` crash on `Open Editor` button press.
Thaddeus Crews 4 月之前
父节点
当前提交
7c35e3999d
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      editor/plugins/animation_blend_tree_editor_plugin.cpp

+ 5 - 0
editor/plugins/animation_blend_tree_editor_plugin.cpp

@@ -1024,6 +1024,11 @@ void AnimationNodeBlendTreeEditor::_scroll_changed(const Vector2 &p_scroll) {
 	if (updating) {
 		return;
 	}
+
+	if (blend_tree.is_null()) {
+		return;
+	}
+
 	updating = true;
 	blend_tree->set_graph_offset(p_scroll / EDSCALE);
 	updating = false;