Skip to content

Commit

Permalink
fix blackboard nullref when duplicating node with blackboard closed (#…
Browse files Browse the repository at this point in the history
…3025)

* add null check for selection enumerable

* update changelog
  • Loading branch information
elizabeth-legros authored Jan 11, 2021
1 parent 2f5b085 commit 81a43cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The version number for this package has increased due to a version update of a r
- Fixed rounded rectangle shape not rendering correctly on Nintendo Switch.
- Fixed an issue where generated `BuildVertexDescriptionInputs()` produced an HLSL warning, "implicit truncation of vector type" [1299179](https://issuetracker.unity3d.com/product/unity/issues/guid/1299179/)
- Fixed an issue on upgrading graphs with inactive Master Nodes causing null ref errors. [1298867](https://issuetracker.unity3d.com/product/unity/issues/guid/1298867/)
- Fixed an issue with duplicating a node with the blackboard closed [1294430](https://issuetracker.unity3d.com/product/unity/issues/guid/1294430/)
- Fixed an issue where ShaderGraph stopped responding after selecting a node after opening the graph with the inspector window hidden [1304501](https://issuetracker.unity3d.com/issues/shadergraph-graph-is-unusable-if-opened-with-graph-inspector-disabled-throws-errors)

## [10.3.0] - 2020-11-03
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ public static List<int> GetIndicesToInsert(SGBlackboard blackboard, int numberOf
for (int x = 0; x < numberOfSections; x++)
indexPerSection.Add(-1);

if (blackboard == null || !blackboard.selection.Any())
if (blackboard == null || blackboard.selection == null || blackboard.selection.Count == 0)
return indexPerSection;

foreach (ISelectable selection in blackboard.selection)
Expand Down

0 comments on commit 81a43cd

Please sign in to comment.