From 757938b2936b737066bce6aed539b1dbd4ef53d5 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Tue, 1 Nov 2022 09:47:25 -0400 Subject: [PATCH] Fix segvault if no config file was specified. --- src/Telodendria.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Telodendria.c b/src/Telodendria.c index 7f6e229..d0ff212 100644 --- a/src/Telodendria.c +++ b/src/Telodendria.c @@ -477,7 +477,7 @@ finish: * If we're not logging to standard output, then we can close it. Otherwise, * if we are logging to stdout, LogConfigFree() will close it for us. */ - if (!(tConfig->flags & TELODENDRIA_LOG_STDOUT)) + if (!tConfig || !(tConfig->flags & TELODENDRIA_LOG_STDOUT)) { fclose(stdout); }