From e443de45de5ef4a358f59e5faf48cf149b831dae Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 24 Jan 2020 22:03:14 +0100 Subject: [PATCH] msgbox: fix segfault with null pointer progressbar Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/19798cbcabaefc294ceae5ae49817d52cbbf7a67 Author: Jacek Jendrzej Date: 2020-01-24 (Fri, 24 Jan 2020) --- src/gui/widget/msgbox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index f4640ac7b..245911d9f 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -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);