fixed Division by float zero

Coverity scan CID 1197074 and more numbers
This commit is contained in:
titiger 2014-12-16 00:56:26 +01:00
parent db0007d277
commit a11855e220

View File

@ -838,7 +838,7 @@ void GraphicScrollBar::init(int x, int y, bool horizontal,int length, int thickn
bool GraphicScrollBar::mouseDown(int x, int y) { bool GraphicScrollBar::mouseDown(int x, int y) {
if(getVisible() && getEnabled() && getEditable()) if(getVisible() && getEnabled() && getEditable())
{ {
if(activated) if(activated && elementCount>0)
{ {
if( elementCount>visibleSize) { if( elementCount>visibleSize) {
int pos; int pos;