neutrino: fix possible div-by-zero in scrollbar calculation

This commit is contained in:
Stefan Seyfried
2013-05-29 15:33:21 +02:00
committed by Jacek Jendrzej
parent 5420e509da
commit a33086568b
11 changed files with 28 additions and 2 deletions

View File

@@ -160,6 +160,9 @@ void CBEChannelWidget::paint()
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
int sbc= ((Channels->size()- 1)/ listmaxshow)+ 1;
if (sbc < 1)
sbc = 1;
float sbh= (sb- 4)/ sbc;
int sbs= (selected/listmaxshow);