From 02099ffd9af2b73e8616f6657c3fc8efd61557ed Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 16 Mar 2012 14:20:26 +0400 Subject: [PATCH] gui/infoviewer.cpp: add safe check --- src/gui/infoviewer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 95ee2a649..7de63f688 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -661,8 +661,10 @@ void CInfoViewer::check_channellogo_ca_SettingsChange() void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap, int epgpos) { - showTitle(channel->number, channel->getName(), channel->getSatellitePosition(), - channel->getChannelID(), calledFromNumZap, epgpos); + if(channel) { + showTitle(channel->number, channel->getName(), channel->getSatellitePosition(), + channel->getChannelID(), calledFromNumZap, epgpos); + } } void CInfoViewer::showTitle(t_channel_id chid, const bool calledFromNumZap, int epgpos) @@ -748,7 +750,6 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok); int ChanNumYPos = BoxStartY + ChanHeight; - //if (g_settings.infobar_sat_display && satellitePosition >= 0 && !satellitePositions.empty()) { if (g_settings.infobar_sat_display) { std::string name = CServiceManager::getInstance()->GetSatelliteName(satellitePosition); int satNameWidth = g_SignalFont->getRenderWidth (name);