summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-05-24 17:05:20 +0200
committerlouis <louis.braun@gmx.de>2014-05-24 17:05:20 +0200
commit1b660a33b8ad7c300fc95e220abddc48b55d3794 (patch)
tree00711a50ffc6887cef1cba0909f9e3e217b093af
parentad4b1f3017d65ecb92b7c5c41ad131c3e0743159 (diff)
downloadskin-nopacity-1b660a33b8ad7c300fc95e220abddc48b55d3794.tar.gz
skin-nopacity-1b660a33b8ad7c300fc95e220abddc48b55d3794.tar.bz2
fixed possible division by zero
-rw-r--r--HISTORY1
-rw-r--r--displaychannelview.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index a45e457..cc62f1e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -432,3 +432,4 @@ Version 1.1.3
- Vertical channel logo alignment configurable in displaychannel
- added dedicated background pixmap in detailview
- added support for tvscraper again, tvscraper Version 0.2.0 needed
+- fixed possible division by zero
diff --git a/displaychannelview.c b/displaychannelview.c
index 078f003..c4e8ddc 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -588,7 +588,7 @@ void cNopacityDisplayChannelView::DrawPoster(const cEvent *event, bool initial)
mediaWidth = call.banner.width;
mediaHeight = call.banner.height;
mediaPath = call.banner.path;
- } else if (call.type == tMovie && call.poster.path.size() > 0) {
+ } else if (call.type == tMovie && call.poster.path.size() > 0 && call.poster.height > 0) {
double ratio = (double)(cOsd::OsdHeight()/3) / (double)call.poster.height;
mediaWidth = ratio * call.poster.width;
mediaHeight = ratio * call.poster.height;