fix unknown address segfault, if audio pid is empty

Origin commit data
------------------
Branch: ni/coolstream
Commit: c2a17dc714
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-04-18 (Thu, 18 Apr 2019)


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

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-04-18 22:22:57 +02:00
committed by vanhofen
parent 5a02f38d42
commit f90556d81d

View File

@@ -1659,8 +1659,12 @@ void COsdSetup::resetRadioText()
if (g_Radiotext == NULL)
g_Radiotext = new CRadioText;
if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio)){
printf("\033[32m[COsdSetup] %s - %d: %d\033[0m\n", __func__, __LINE__, 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);
unsigned int pid = 0;
if(!g_RemoteControl->current_PIDs.APIDs.empty())
pid = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid;
g_Radiotext->setPid(pid);
printf("\033[32m[COsdSetup] %s - %d: %d\033[0m\n", __func__, __LINE__, pid);
}
} else {
if (g_Radiotext)