Skip to content

Commit

Permalink
Prevent filter addition with empty string reference when using Enter
Browse files Browse the repository at this point in the history
-Added string null and empty check to prevent the filter from being added if the string reference is not defined
  • Loading branch information
Varneon committed Mar 2, 2022
1 parent 970a76b commit cb4f644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Varneon/UdonExplorer/Editor/FilterEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static void DrawValueFilterModeField()

private static void DrawStringReferenceField()
{
if (Event.current.Equals(Event.KeyboardEvent("return")) && GUI.GetNameOfFocusedControl().Equals("StringReference") && ListView != null)
if (Event.current.Equals(Event.KeyboardEvent("return")) && !string.IsNullOrEmpty(StringReference) && GUI.GetNameOfFocusedControl().Equals("StringReference") && ListView != null)
{
Event.current.Use();
ListView.AddFilter(GetFilter());
Expand Down

0 comments on commit cb4f644

Please sign in to comment.