Fixed right clicking Unused Objects group throwing an exception if that search result group hasn't been expanded yet

This commit is contained in:
yasirkula
2022-09-23 14:16:04 +03:00
parent 635d0653fa
commit 875f3e6794
@@ -725,7 +725,7 @@ namespace AssetUsageDetectorNamespace
if( searchResult != null )
contextMenu.AddItem( new GUIContent( "Hide" ), false, () => searchResult.RemoveSearchResultGroup( this ) );
if( references.Count > 0 )
if( references.Count > 0 && treeView != null )
{
if( contextMenu.GetItemCount() > 0 )
contextMenu.AddSeparator( "" );