Browse Source

Add Catch ContentMatch Execeptions

Returns a false when search is invalid
master
shalliwell 5 years ago
parent
commit
c034808565
  1. 9
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

9
Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

@ -565,7 +565,14 @@ namespace Fungus.EditorUtils
private bool IsCommandContentMatch(Block block)
{
return block.CommandList.Any(command => command.GetSearchableContent().IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0);
try
{
return block.CommandList.Any(command => command.GetSearchableContent().IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0);
}
catch (Exception)
{
return false;
}
}
protected virtual void HandleEarlyEvents(Event e)

Loading…
Cancel
Save