Browse Source

Add Catch ContentMatch Execeptions

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

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

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

Loading…
Cancel
Save