From a30eb4d709387b1db5dce71308d33e09a84bff11 Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Thu, 14 Apr 2016 22:29:59 +0800 Subject: [PATCH] Fixed a potential NULL assignment in FOptionMenuItemSafeCommand::Activate --- src/menu/optionmenuitems.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index 28135e78dc..f810f788bb 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -133,9 +133,9 @@ public: } FString FullString; - FullString.Format(TEXTCOLOR_WHITE "%s" TEXTCOLOR_NORMAL "\n\n" "%s", actionLabel, msg); + FullString.Format(TEXTCOLOR_WHITE "%s" TEXTCOLOR_NORMAL "\n\n" "%s", actionLabel != NULL ? actionLabel : "", msg); - if (msg && actionLabel && FullString) M_StartMessage(FullString, 0); + if (msg && FullString) M_StartMessage(FullString, 0); return true; } };