GUI: Don't crash on empty dictionary in predictive dialog
This commit is contained in:
parent
bf5208dd3d
commit
aded46f08b
1 changed files with 4 additions and 0 deletions
|
@ -724,6 +724,10 @@ int PredictiveDialog::binarySearch(const char *const *const dictLine, const Comm
|
|||
}
|
||||
|
||||
bool PredictiveDialog::matchWord() {
|
||||
// If there is no dictionary, then there is no match.
|
||||
if (_unitedDict.dictLineCount <= 0)
|
||||
return false;
|
||||
|
||||
// If no text has been entered, then there is no match.
|
||||
if (_currentCode.empty())
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue