浏览代码

Fixed a bug causing null reference errors if no graph asset was selected

/main
Peter Bay Bastian 8 年前
当前提交
4d814c36
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/SerializableGraphView.cs

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/SerializableGraphView.cs


private void PropagateSelection()
{
var graphDataSource = GetPresenter<AbstractGraphDataSource>();
if (graphDataSource == null) return;
if (graphDataSource == null || graphDataSource.graphAsset == null) return;
var selectedNodeGuids = selection.OfType<NodeDrawer>().Select(x => ((NodeDrawData) x.presenter).node.guid);
graphDataSource.graphAsset.drawingData.selection = selectedNodeGuids;

正在加载...
取消
保存