From 8d2f0edce2168f3d48fcf806d6b1e35eefcbea74 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sun, 4 Oct 2015 14:44:09 +0100 Subject: [PATCH] Guard usage of f_log in compile_dictlist_file. --- src/compiledict.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiledict.cpp b/src/compiledict.cpp index 4c389670..8bd83ec2 100644 --- a/src/compiledict.cpp +++ b/src/compiledict.cpp @@ -1,6 +1,7 @@ /*************************************************************************** * Copyright (C) 2005 to 2014 by Jonathan Duddington * * email: jonsd@users.sourceforge.net * + * Copyright (C) 2015 by Reece H. Dunn * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -870,7 +871,8 @@ static int compile_dictlist_file(const char *path, const char* filename) return(-1); } - fprintf(f_log,"Compiling: '%s'\n",fname); + if(f_log != NULL) + fprintf(f_log,"Compiling: '%s'\n",fname); linenum=0; @@ -900,7 +902,8 @@ static int compile_dictlist_file(const char *path, const char* filename) count++; } - fprintf(f_log,"\t%d entries\n",count); + if(f_log != NULL) + fprintf(f_log,"\t%d entries\n",count); fclose(f_in); return(0); } /* end of compile_dictlist_file */