msgbox.cpp: fix possible crash if no buttons defined

Origin commit data
------------------
Branch: ni/coolstream
Commit: e2946e7229
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-11-24 (Tue, 24 Nov 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2020-11-24 15:04:35 +01:00
committed by vanhofen
parent 078c62bea6
commit 3d1a7419d1

View File

@@ -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;