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
1 changed files with 1 additions and 1 deletions

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) {
if(getVisible() && getEnabled() && getEditable())
{
if(activated)
if(activated && elementCount>0)
{
if( elementCount>visibleSize) {
int pos;