Properly handle right clicks without selectd items

This commit is contained in:
~lucidiot 2022-07-19 04:09:10 +02:00
parent 5163c2db09
commit 3ee3b87ea8
1 changed files with 4 additions and 2 deletions

View File

@ -89,9 +89,11 @@ namespace ToeCracker {
return null;
string word = (string)((ListBox)this.tabControl.SelectedTab.Controls[0]).SelectedItem;
word = word.Trim();
if (word == null)
return null;
// Ignore empty lines and subgroups. Subgroups are represented as "-- ANTONYMS --"
word = word.Trim();
if (word == String.Empty || word.StartsWith("-- "))
return null;