diff options
author | Torbjörn Andersson | 2016-02-28 15:23:24 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2016-02-28 15:23:24 +0100 |
commit | aded46f08b476ee1caccc070b8495cafe7094b47 (patch) | |
tree | caca2618d2c478f000dba626d42d408c2254a54a /gui | |
parent | bf5208dd3df18e7ff05c4e18b3f03c00baf22238 (diff) | |
download | scummvm-rg350-aded46f08b476ee1caccc070b8495cafe7094b47.tar.gz scummvm-rg350-aded46f08b476ee1caccc070b8495cafe7094b47.tar.bz2 scummvm-rg350-aded46f08b476ee1caccc070b8495cafe7094b47.zip |
GUI: Don't crash on empty dictionary in predictive dialog
Diffstat (limited to 'gui')
-rw-r--r-- | gui/predictivedialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index d9dd5734f8..9557da1206 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -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; |