commit 99f7db0e65050504c096c4620867be6ed7efffe7
parent 67cbfe8febcfc1e5e017b4f9e55bc7234f81269e
Author: Claudio Alessi <smoppy@gmail.com>
Date: Sat, 21 Apr 2018 14:47:54 +0200
Don't call quit() if not connected.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/circo.c b/circo.c
@@ -313,6 +313,10 @@ void
cmd_quit(char *cmd, char *s) {
Buffer *b;
+ if(!srv) {
+ bprintf(sel, "/%s: not connected.\n", cmd);
+ return;
+ }
quit(s);
for(b = buffers; b; b = b->next)
bprintf(b, "Quit.\n");