From c6e47054472b809703569890fb2745d4f2cda3d1 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 19 Apr 2019 14:59:49 -0300 Subject: Fix input causing misc. crashes before 100% loaded Definitely by pressing Ctrl-L but probably any of these would cause all sorts of badness. --- ui.js | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit 1.3.0-6-gf8a5