Skip to content

Commit 875f3e6

Browse files
committed
Fixed right clicking Unused Objects group throwing an exception if that search result group hasn't been expanded yet
1 parent 635d065 commit 875f3e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Plugins/AssetUsageDetector/Editor/SearchResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ public float DrawOnGUI( SearchResult searchResult, EditorWindow window, float sc
725725
if( searchResult != null )
726726
contextMenu.AddItem( new GUIContent( "Hide" ), false, () => searchResult.RemoveSearchResultGroup( this ) );
727727

728-
if( references.Count > 0 )
728+
if( references.Count > 0 && treeView != null )
729729
{
730730
if( contextMenu.GetItemCount() > 0 )
731731
contextMenu.AddSeparator( "" );

0 commit comments

Comments
 (0)