mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-11 03:51:31 +02:00
Common/MsgHandler: Brace if statement in MsgAlert
The condition travels more than one line, so the body should be braced. While we're at it, make the comparison against nullptr explicit.
This commit is contained in:
parent
0eddf6dd8f
commit
e7dd46a531
@ -121,8 +121,11 @@ bool MsgAlert(bool yes_no, MsgType style, const char* format, ...)
|
||||
ERROR_LOG(MASTER_LOG, "%s: %s", caption.c_str(), buffer);
|
||||
|
||||
// Don't ignore questions, especially AskYesNo, PanicYesNo could be ignored
|
||||
if (s_msg_handler && (s_alert_enabled || style == MsgType::Question || style == MsgType::Critical))
|
||||
if (s_msg_handler != nullptr &&
|
||||
(s_alert_enabled || style == MsgType::Question || style == MsgType::Critical))
|
||||
{
|
||||
return s_msg_handler(caption.c_str(), buffer, yes_no, style);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user