From: Wolfgang (Blub) Bumiller Date: Fri, 23 Nov 2012 13:59:56 +0000 (+0100) Subject: ftepp_out can return a nullptr X-Git-Tag: 0.1.9~310 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=498cbf6fa5318b83b764dbc3a274b5aaec6ff0ef;p=xonotic%2Fgmqcc.git ftepp_out can return a nullptr --- diff --git a/main.c b/main.c index 76e4007..a73f3f1 100644 --- a/main.c +++ b/main.c @@ -567,11 +567,14 @@ srcdone: } if (opts_pp_only) { + const char *out; if (!ftepp_preprocess_file(items[itr].filename)) { retval = 1; goto cleanup; } - fprintf(outfile, "%s", ftepp_get()); + out = ftepp_get(); + if (out) + fprintf(outfile, "%s", out); ftepp_flush(); } else {