From 2d8c5d4aec5885a3cc7adf2a2cc7f48840f3c28d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 6 Mar 2009 23:22:04 -0500 Subject: [PATCH] Fixed NULL dereference in debug output. --- mojoshader_preprocessor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mojoshader_preprocessor.c b/mojoshader_preprocessor.c index fd4d8730..a96857fa 100644 --- a/mojoshader_preprocessor.c +++ b/mojoshader_preprocessor.c @@ -30,7 +30,8 @@ static Token debug_preprocessor_lexer(IncludeState *s) #if DEBUG_TOKENIZER static void print_debug_lexing_position(IncludeState *s) { - printf("NOW LEXING %s:%d ...\n", s->filename, s->line); + if (s != NULL) + printf("NOW LEXING %s:%d ...\n", s->filename, s->line); } // print_debug_lexing_position #else #define print_debug_lexing_position(s)