From 0d3183e58bd78632a5c3f672caa42d056ac51cb5 Mon Sep 17 00:00:00 2001 From: Scott Ludwig Date: Tue, 26 Jan 2016 12:08:47 -0800 Subject: [PATCH] Fix observed DEBUG build crash in assert handling This is a second case of this problem. It didn't used to crash which suggests vprintf used to check for NULL varargs itself. --- inc/rip.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/rip.cpp b/inc/rip.cpp index d33a510..b13a662 100644 --- a/inc/rip.cpp +++ b/inc/rip.cpp @@ -383,7 +383,11 @@ void DoRip(char *psz, va_list va) { printf("Assert:\n"); printf("File: %s, Line: %d\n", gpszRipFile, giRipLine); - vprintf(psz, va); + if (va == NULL) { + printf(psz); + } else { + vprintf(psz, va); + } Break(); }