msgbox: fix segfault with null pointer progressbar

Origin commit data
------------------
Commit: 19798cbcab
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-24 (Fri, 24 Jan 2020)
This commit is contained in:
Jacek Jendrzej
2020-01-24 22:03:14 +01:00
committed by vanhofen
parent 857cb85e2d
commit e443de45de

View File

@@ -323,7 +323,8 @@ int CMsgBox::exec()
//***refresh timeout on any pressed navi key! This resets current timeout end to initial value***
if (timeout > 0) {
timeout_pb->setValues(0, timeout);
if(timeout_pb)
timeout_pb->setValues(0, timeout);
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
}
dprintf(DEBUG_INFO, "\033[32m[CMsgBox] [%s - %d] result = %d, mb_show_button = %d\033[0m\n", __func__, __LINE__, result, mb_show_button);