From da34f33c46f47ceb43a9c9875a8904a4f4ccefe3 Mon Sep 17 00:00:00 2001 From: defans Date: Wed, 9 Oct 2013 00:19:11 +0200 Subject: [PATCH] fix possible segfault in channallist fix segfaut channallist in movieplayer mode with active minitv Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/88b92d3d90daa37128597d1835219b0929536b07 Author: defans Date: 2013-10-09 (Wed, 09 Oct 2013) ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 5 +++-- src/gui/channellist.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 990205fa4..48a530985 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -121,6 +121,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl dline = NULL; cc_minitv = NULL; logo_off = 0; + pig_on_win = false; //printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout); } @@ -535,7 +536,7 @@ void CChannelList::calcSize() fheight = 1; /* avoid div-by-zero crash on invalid font */ footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; - bool pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) ); + pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) ); // calculate width full_width = pig_on_win ? (frameBuffer->getScreenWidth()-2*ConnectLineBox_Width) : frameBuffer->getScreenWidthRel(); @@ -2150,7 +2151,7 @@ void CChannelList::paint() liststart = (selected/listmaxshow)*listmaxshow; updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow)); - if (g_settings.channellist_additional == 2) // with miniTV + if (pig_on_win) // with miniTV paintPig(x+width, y+theight, pig_width, pig_height); // paint background for main box diff --git a/src/gui/channellist.h b/src/gui/channellist.h index d52e14ebd..da8600dfc 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -99,6 +99,7 @@ private: bool vlist; // "virtual" list, not bouquet bool displayNext; bool displayList; + bool pig_on_win; int first_mode_found; int ChannelList_Rec;