diff options
author | Florrie <towerofnix@gmail.com> | 2019-04-19 14:59:49 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-04-19 14:59:49 -0300 |
commit | c6e47054472b809703569890fb2745d4f2cda3d1 (patch) | |
tree | e1a6caf1243598dbd655c62e776911916663612b | |
parent | 8feefa78118cdfe9a98198786a0315053dc098a1 (diff) |
Fix input causing misc. crashes before 100% loaded
Definitely by pressing Ctrl-L but probably any of these would cause all sorts of badness.
-rw-r--r-- | ui.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.js b/ui.js index 049930b..e29fb2c 100644 --- a/ui.js +++ b/ui.js @@ -1153,6 +1153,12 @@ class GrouplikeListingElement extends Form { } keyPressed(keyBuf) { + // Just about everything here depends on the grouplike existing, so let's + // not continue if it doesn't! + if (!this.grouplike) { + return + } + if (telc.isBackspace(keyBuf)) { this.loadParentGrouplike() } else if (telc.isCharacter(keyBuf, '/') || keyBuf[0] === 6) { // '/', ctrl-F |