summaryrefslogtreecommitdiff
path: root/displaychannelview.c
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 /displaychannelview.c
parentad4b1f3017d65ecb92b7c5c41ad131c3e0743159 (diff)
downloadskin-nopacity-1b660a33b8ad7c300fc95e220abddc48b55d3794.tar.gz
skin-nopacity-1b660a33b8ad7c300fc95e220abddc48b55d3794.tar.bz2
fixed possible division by zero
Diffstat (limited to 'displaychannelview.c')
-rw-r--r--displaychannelview.c2
1 files changed, 1 insertions, 1 deletions
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;