diff options
Diffstat (limited to 'functions.c')
-rw-r--r-- | functions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/functions.c b/functions.c index dbcc54e..cdb594c 100644 --- a/functions.c +++ b/functions.c @@ -80,6 +80,12 @@ void debugprint(int level, char *format, ...) { FILE *fp; int bytes = 0; fp = fopen(debugpath, "a"); + + if (fp == NULL) { + printf("Couldn't open debugpath '%s'!\n", debugpath); + return; + } + if ((bytes = vfprintf(fp, format, args)) < 0) { debugprint(DEBUG_CRIT, "error: could not write to debug file.\n"); } |