Skip to content

Commit

Permalink
fix: dumps happen when processing backspace or escape, if predict db …
Browse files Browse the repository at this point in the history
…is not loaded successfully. incomplete fix of #20 (#26)
  • Loading branch information
fxliang authored Jun 19, 2024
1 parent 72e4d71 commit 67c2881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Predictor::~Predictor() {
}

ProcessResult Predictor::ProcessKeyEvent(const KeyEvent& key_event) {
if (!engine_)
if (!engine_ || !predict_engine_)
return kNoop;
auto keycode = key_event.keycode();
if (keycode == XK_BackSpace || keycode == XK_Escape) {
Expand Down

0 comments on commit 67c2881

Please sign in to comment.