X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=accesslog.cpp;fp=accesslog.cpp;h=3183a10f5f1810fa4890e43fedf5c84c7ff20801;hp=f8ee50bd42d39589fbe812624310fa52c8ec80e4;hb=478d39996e950ef31d9c2de74c72890060b21260;hpb=92d6f938a9a9c09d8c875214529242072a9dea4d diff --git a/accesslog.cpp b/accesslog.cpp index f8ee50b..3183a10 100644 --- a/accesslog.cpp +++ b/accesslog.cpp @@ -89,9 +89,11 @@ void AccessLogThread::do_work() continue; } } - - if (fclose(logfp) == EOF) { - log_perror("fclose"); + + if (logfp != NULL) { + if (fclose(logfp) == EOF) { + log_perror("fclose"); + } } logfp = NULL;