mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
avoid null pointer use
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8fb4e1b78e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-04-21 (Thu, 21 Apr 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -86,6 +86,7 @@ void CAdZapMenu::Init()
|
||||
{
|
||||
CChannelList *channelList = CNeutrinoApp::getInstance()->channelList;
|
||||
channelId = channelList ? channelList->getActiveChannel_ChannelID() : -1;
|
||||
if(channelList)
|
||||
channelName = channelList->getActiveChannelName();
|
||||
evtlist.clear();
|
||||
CEitManager::getInstance()->getEventsServiceKey(channelId & 0xFFFFFFFFFFFFULL, evtlist);
|
||||
|
@@ -104,7 +104,7 @@ int CCAMMenuHandler::doMainMenu()
|
||||
char name1[255]={0};
|
||||
char str1[255]={0};
|
||||
|
||||
int CiSlots = ca->GetNumberCISlots();
|
||||
int CiSlots = ca ? ca->GetNumberCISlots() : 0;
|
||||
|
||||
CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS);
|
||||
cammenu->addIntroItems();
|
||||
@@ -171,7 +171,7 @@ int CCAMMenuHandler::doMainMenu()
|
||||
}
|
||||
|
||||
i = 0;
|
||||
int ScNum = ca->GetNumberSmartCardSlots();
|
||||
int ScNum = ca ? ca->GetNumberSmartCardSlots() : 0;
|
||||
printf("CCAMMenuHandler::doMainMenu sc slots: %d\n", ScNum);
|
||||
|
||||
if(ScNum && CiSlots)
|
||||
|
@@ -248,10 +248,10 @@ int CLuaInstCCWindow::CCWindowPaintHeader(lua_State *L)
|
||||
if (!D) return 0;
|
||||
|
||||
CComponentsHeader* header = D->w->getHeaderObject();
|
||||
if (header)
|
||||
if (header){
|
||||
D->w->showHeader();
|
||||
header->paint();
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -1055,6 +1055,7 @@ void CMoviePlayerGui::stopPlayBack(void)
|
||||
printf("%s: this %p join background thread %lx\n", __func__, this, bgThread);fflush(stdout);
|
||||
mutex.lock();
|
||||
webtv_started = false;
|
||||
if(playback)
|
||||
playback->RequestAbort();
|
||||
mutex.unlock();
|
||||
cond.broadcast();
|
||||
@@ -1832,7 +1833,7 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
APIDSelector.addItem(item, defpid);
|
||||
}
|
||||
|
||||
int percent[numpida];
|
||||
int percent[numpida+1];
|
||||
if (p_movie_info && numpida <= p_movie_info->audioPids.size()) {
|
||||
APIDSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUST));
|
||||
|
||||
@@ -2061,7 +2062,8 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
#endif
|
||||
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
|
||||
char play_pos[32];
|
||||
snprintf(play_pos, sizeof(play_pos), "%3d %s", p_movie_info->bookmarks.lastPlayStop/60, unit_short_minute);
|
||||
int lastplaystop = p_movie_info ? p_movie_info->bookmarks.lastPlayStop/60:0;
|
||||
snprintf(play_pos, sizeof(play_pos), "%3d %s", lastplaystop, unit_short_minute);
|
||||
char start_pos[32] = {0};
|
||||
if (p_movie_info->bookmarks.start != 0)
|
||||
snprintf(start_pos, sizeof(start_pos), "%3d %s", p_movie_info->bookmarks.start/60, unit_short_minute);
|
||||
|
@@ -72,7 +72,6 @@ int CPictureViewerSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
|
||||
if(actionKey == "picturedir")
|
||||
{
|
||||
parent->hide();
|
||||
CFileBrowser b;
|
||||
b.Dir_Mode=true;
|
||||
if (b.exec(g_settings.network_nfs_picturedir.c_str()))
|
||||
|
@@ -382,6 +382,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return menu_return::RETURN_EXIT;
|
||||
}
|
||||
else if(actionKey == "rec_dir1") {
|
||||
if (parent)
|
||||
parent->hide();
|
||||
const char *action_str = "RecDir1";
|
||||
if(chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1)) {
|
||||
@@ -391,6 +392,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "rec_dir2") {
|
||||
if (parent)
|
||||
parent->hide();
|
||||
const char *action_str = "RecDir2";
|
||||
if(chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1)) {
|
||||
|
Reference in New Issue
Block a user