use assert since we expect format string not to be null pointer

This commit is contained in:
RadWolfie 2020-06-20 03:51:51 -05:00
parent 4043ac1b01
commit 2c73d8b736
1 changed files with 2 additions and 6 deletions

View File

@ -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: {