about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-07 20:00:49 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-07 20:00:49 +0200
commit23339918fa58f570a2b12bc7c7e78d4d8681b9a2 (patch)
treeb0ec7e21545706a6349992938559407d296c4b0e /src/display
parent75310d68b875964c757c73ab1df791cda6fba756 (diff)
downloadchawan-23339918fa58f570a2b12bc7c7e78d4d8681b9a2.tar.gz
Add missing null check
Diffstat (limited to 'src/display')
-rw-r--r--src/display/pager.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/pager.nim b/src/display/pager.nim
index fde58c92..ad89d0d4 100644
--- a/src/display/pager.nim
+++ b/src/display/pager.nim
@@ -93,7 +93,8 @@ iterator containers*(pager: Pager): Container {.inline.} =
 proc setContainer*(pager: Pager, c: Container) {.jsfunc.} =
   pager.container = c
   pager.redraw = true
-  pager.term.setTitle(c.getTitle())
+  if c != nil:
+    pager.term.setTitle(c.getTitle())
 
 proc hasprop(pager: Pager, s: string): bool {.jshasprop.} =
   if pager.container != nil: