From 0547d9ebc14062580904393b8ca5e2ba664a22c6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 19 Aug 2018 21:14:55 +0200 Subject: [PATCH] cc_frm_footer.cpp: avoid possible crash if content[i].button = NULL If content[i].button = NULL, conversion of content[i].button into std::string would fail. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/20ab649f45df8f720bf1b225c08963f56911d75d Author: Thilo Graf Date: 2018-08-19 (Sun, 19 Aug 2018) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 458b39f0f..c49b7fe15 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -204,7 +204,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_cc * const con * init button label face values */ string txt = content[i].locale == NONEXISTANT_LOCALE ? content[i].text : g_Locale->getText(content[i].locale); - string icon_name = string(content[i].button); + string icon_name = content[i].button ? string(content[i].button) : ""; /* * Ignore item, if no text and no icon is defined.