diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-06-19 16:01:24 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-06-19 16:03:33 -0400 |
| commit | e7dd46a531c342ee3e041de2e1edc96a123ee5dd (patch) | |
| tree | c2b2fac2d0a8fa985c5523421258e04206997460 /Source/Core/Common/MsgHandler.cpp | |
| parent | 0eddf6dd8f2eb02bba48e38c24a90180e45b3799 (diff) | |
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.
Diffstat (limited to 'Source/Core/Common/MsgHandler.cpp')
| -rw-r--r-- | Source/Core/Common/MsgHandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Common/MsgHandler.cpp b/Source/Core/Common/MsgHandler.cpp index 4744a5ff44..41979c1ef0 100644 --- a/Source/Core/Common/MsgHandler.cpp +++ b/Source/Core/Common/MsgHandler.cpp @@ -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; } |
