From 1b660a33b8ad7c300fc95e220abddc48b55d3794 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 24 May 2014 17:05:20 +0200 Subject: fixed possible division by zero --- displaychannelview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'displaychannelview.c') 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; -- cgit v1.2.3