diff options
author | louis <louis.braun@gmx.de> | 2014-04-15 17:25:34 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-04-15 17:25:34 +0200 |
commit | d20a619ab3589e3580c7a4e36ab6c60591f5d4a1 (patch) | |
tree | 33d1983b35b2fefa64f4e6d9aa99b1bdd775e162 | |
parent | f098d9e6a0cac45a591c673710430e10cac199f1 (diff) | |
download | skin-nopacity-d20a619ab3589e3580c7a4e36ab6c60591f5d4a1.tar.gz skin-nopacity-d20a619ab3589e3580c7a4e36ab6c60591f5d4a1.tar.bz2 |
fixed crash in detailed epg view
-rw-r--r-- | menudetailview.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/menudetailview.c b/menudetailview.c index c45b5b0..f4ed706 100644 --- a/menudetailview.c +++ b/menudetailview.c @@ -43,6 +43,8 @@ void cNopacityMenuDetailView::SetGeometry(int x, int width, int height, int top, } void cNopacityMenuDetailView::DrawTextWrapper(cTextWrapper *wrapper, int top) { + if (top > contentDrawPortHeight) + return; int linesText = wrapper->Lines(); int textHeight = font->Height(); int currentHeight = top; @@ -76,6 +78,8 @@ int cNopacityMenuDetailView::HeightActorPics(void) { actorThumbHeight = mediaInfo.actors[0].thumb.height/2; } int picsPerLine = contentWidth / (actorThumbWidth + 2*border); + if (picsPerLine < 1) + return 0; int picLines = numActors / picsPerLine; if (numActors%picsPerLine != 0) picLines++; @@ -164,14 +168,14 @@ int cNopacityMenuDetailView::HeightScraperInfo(void) { } scrapInfo.Set(info.str().c_str(), font, contentWidth - 2 * border); int lineHeight = font->Height(); - int scrapInfoHeight = (scrapInfo.Lines() + 1) * lineHeight; + heightScraperInfo = (scrapInfo.Lines() + 1) * lineHeight; if (isSeries) { if (series.banners.size() == 2) - scrapInfoHeight += series.banners[1].height + lineHeight; + heightScraperInfo += (series.banners[1].height + lineHeight); else if (series.banners.size() == 3) - scrapInfoHeight += series.banners[1].height + series.banners[2].height + 2*lineHeight; + heightScraperInfo += (series.banners[1].height + series.banners[2].height + 2*lineHeight); } - return scrapInfoHeight; + return heightScraperInfo; } int cNopacityMenuDetailView::HeightFanart(void) { |