From 3d1a7419d11786b0e87bfe119177965375352e01 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 24 Nov 2020 15:04:35 +0100 Subject: [PATCH] msgbox.cpp: fix possible crash if no buttons defined Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e2946e7229d02cca6a7f0246f7f9374829901c7c Author: Thilo Graf Date: 2020-11-24 (Tue, 24 Nov 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/msgbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 245911d9f..3966f2d39 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -265,7 +265,10 @@ int CMsgBox::exec() neutrino_msg_data_t data; int res = menu_return::RETURN_REPAINT; - ccw_footer->getSelectedButtonObject()->setButtonAlias(mb_show_button); + CComponentsButton *btn = ccw_footer->getSelectedButtonObject(); + if (btn) + btn->setButtonAlias(mb_show_button); + int selected = ccw_footer->getSelectedButton(); if (timeout == NO_TIMEOUT) timeout = 0;