diff options
| author | Paul Gilbert | 2016-03-20 14:55:41 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2016-03-20 14:55:41 -0400 |
| commit | 3c852cc240221785598023de56e5a71a0d8806fa (patch) | |
| tree | c2a64b811586e4e9d8a4d5baa04d5c4f9d23bd08 /gui/predictivedialog.cpp | |
| parent | ea54e6244e75c609e6886ba210f80fb22c479d3f (diff) | |
| parent | 509a00109e79156e91c062f145ac3aa86ec8584e (diff) | |
| download | scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.gz scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.bz2 scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.zip | |
Merge branch 'master' into titanic
Diffstat (limited to 'gui/predictivedialog.cpp')
| -rw-r--r-- | gui/predictivedialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 6ff10267db..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; @@ -981,6 +985,7 @@ void PredictiveDialog::loadAllDictionary(Dict &dict) { Common::File *inFile = new Common::File(); if (!inFile->open(ConfMan.get(dict.nameDict))) { warning("Predictive Dialog: cannot read file: %s", dict.defaultFilename.c_str()); + delete inFile; return; } loadDictionary(inFile, dict); |
