infoviewer.cpp fix possible segfault if APIDs is empty

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9c4e8b028b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-04-02 (Thu, 02 Apr 2015)


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

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2015-04-02 15:00:08 +02:00
parent 874e84c090
commit f418c62cae

View File

@@ -1325,7 +1325,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
if ((*(t_channel_id *) data) == channel_id) { if ((*(t_channel_id *) data) == channel_id) {
if (is_visible && showButtonBar) if (is_visible && showButtonBar)
infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_AUDIO); infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_AUDIO);
if (g_settings.radiotext_enable && g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio))
g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid);
} }
return messages_return::handled; return messages_return::handled;