ui_txt: check for curentry is NULL like ui_ti - sacc - sacc(omys), simple console gopher client
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
Log
Files
Refs
Tags
LICENSE
---
commit c7ab5157ebc7e7d502e0970770a7e7be48e61ea2
parent 10ed3e55246b65f39aa19f3c63bb0241c62d4f6c
Author: Hiltjo Posthuma 
Date:   Tue, 25 Dec 2018 19:33:21 +0100

ui_txt: check for curentry is NULL like ui_ti

This can happen if SIGWINCH is signaled before a connection is made,
reproducable with: st -e sacc bitreich.org.

Diffstat:
  M ui_txt.c                            |       4 ++++

1 file changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/ui_txt.c b/ui_txt.c
@@ -331,6 +331,10 @@ void
 uisigwinch(int signal)
 {
         uisetup();
+
+        if (!curentry)
+                return;
+
         putchar('\n');
         uidisplay(curentry);
         printstatus(curentry, cmd);