From 99d1e817c5db384cd586221f552ede2c256d613b Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 19 Oct 2022 13:19:02 +0200 Subject: Fix crash on opening unavailable resources --- src/display/client.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/display/client.nim b/src/display/client.nim index 1f15e907..78f29f43 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -290,9 +290,13 @@ proc launchClient*(client: Client, pages: seq[string], ctype: string, dump: bool client.pager.loadURL(page, force = true, ctype = ctype) if stdout.isatty and not dump: - when defined(posix): - enableRawMode() - client.inputLoop() + if client.pager.container != nil: + when defined(posix): + enableRawMode() + client.inputLoop() + else: + for msg in client.pager.status: + eprint msg else: for msg in client.pager.status: eprint msg -- cgit