Skip to content

Commit fa51210

Browse files
julienamsellemEvergreen
authored andcommitted
Fixed NRE when node search's category color is reset
Jira: UUM-71376 Steps to reproduce: 1. Create project using High Definition 3D Template 2. Create VFX Asset and open it 3. In New VFX window press space or right-click to open VFX Node Search Window 4. In VFX Node Search window press on “>” to show details panel 5. Select the “Context” folder and change the folder color 6. Once the color of the folder is changed press “Reset color to default” button 7. Observe the Console window Actual results: "NullReferenceException: Object reference not set to an instance of an object" error is thrown when pressing reset button Expected results: No errors when pressing reset button Reproducible with versions: 6000.0.1f1 Not reproducible with versions: 6000.0.0f1 Tested on (OS): macOS Sonoma 14.4.1 (M1), Windows 10 ![Video](https://jira.unity3d.com/secure/attachment/1443182/Screen%20Recording%202024-05-03%20at%2010.51.02.mov)
1 parent a8d0f25 commit fa51210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Packages/com.unity.visualeffectgraph/Editor/FilterPopup/VFXFilterWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ private void OnResetCategoryColor(ClickEvent evt)
318318
var descriptor = (Descriptor)m_Treeview.selectedItem;
319319
settings.ResetCategoryColor(descriptor.name);
320320
var element = m_Treeview.GetRootElementForIndex(m_Treeview.selectedIndex);
321-
var label = element.Q<Label>("descriptorLabel");
321+
var label = element.Q<Label>("categoryLabel");
322322
label.style.unityBackgroundImageTintColor = new StyleColor(StyleKeyword.Null);
323323
m_CategoryColorField.value = label.resolvedStyle.unityBackgroundImageTintColor;
324324
}

0 commit comments

Comments
 (0)