From 66fcaa3a905151d7432f358fcf660d2b092e55f9 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sun, 29 May 2016 22:39:42 +0200 Subject: [PATCH] fix segfault in lcd4l if no movieinfo is present Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bf5a3aa2f24fc128f0e6194f380ead405fac7b1a Author: TangoCash Date: 2016-05-29 (Sun, 29 May 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 87819bf5d..66700023e 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -480,8 +480,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) { if (ModeTshift) Service = g_Locale->getText(LOCALE_RECORDINGMENU_TIMESHIFT); - else if (!CMoviePlayerGui::getInstance().p_movie_info->epgChannel.empty()) - Service = CMoviePlayerGui::getInstance().p_movie_info->epgChannel; + else if (CMoviePlayerGui::getInstance().p_movie_info) + { + if (!CMoviePlayerGui::getInstance().p_movie_info->epgChannel.empty()) + Service = CMoviePlayerGui::getInstance().p_movie_info->epgChannel; + } if (Service.empty()) Service = g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD); @@ -498,10 +501,13 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) Logo = ICONSDIR "/" NEUTRINO_ICON_PAUSE ICONSEXT; break; case 3: /* play */ - if (!GetLogoName(CMoviePlayerGui::getInstance().p_movie_info->epgId, - CMoviePlayerGui::getInstance().p_movie_info->epgChannel, - Logo)) - Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; + if (CMoviePlayerGui::getInstance().p_movie_info) + { + if (!GetLogoName(CMoviePlayerGui::getInstance().p_movie_info->epgId, + CMoviePlayerGui::getInstance().p_movie_info->epgChannel, + Logo)) + Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; + } break; default: /* show movieplayer-icon */ Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT; @@ -690,12 +696,14 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) //} else if (parseID == MODE_TS) { - if (!CMoviePlayerGui::getInstance().pretty_name.empty()) + if (CMoviePlayerGui::getInstance().p_movie_info) + { + if (!CMoviePlayerGui::getInstance().p_movie_info->epgTitle.empty()) + Event = CMoviePlayerGui::getInstance().p_movie_info->epgTitle; + } + else if (!CMoviePlayerGui::getInstance().pretty_name.empty()) Event = CMoviePlayerGui::getInstance().pretty_name; - if (!CMoviePlayerGui::getInstance().p_movie_info->epgTitle.empty()) - Event = CMoviePlayerGui::getInstance().p_movie_info->epgTitle; - if (Event.empty()) Event = "MOVIE";