From 2c73d8b73654ecfaaf2d1453ccccf2cff52ead16 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 20 Jun 2020 03:51:51 -0500 Subject: [PATCH] use assert since we expect format string not to be null pointer --- src/common/Logging.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/Logging.cpp b/src/common/Logging.cpp index c886276d6..138bb690e 100644 --- a/src/common/Logging.cpp +++ b/src/common/Logging.cpp @@ -281,12 +281,8 @@ PopupReturn PopupCustomEx(const void* hwnd, const CXBXR_MODULE cxbxr_module, con va_list argp; UINT uType = MB_TOPMOST | MB_SETFOREGROUND; - // If there's no message, then return default value. - if (!message) { - uType |= MB_ICONERROR | MB_OK; - (void)CxbxMessageBox("message is null pointer", ret_default, uType, (const HWND)hwnd); - return ret_default; - } + // Make assert whenever the format string is null pointer which isn't allow in here. + assert(!message); switch (icon) { case PopupIcon::Warning: {