summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;