diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-05-07 14:10:56 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-05-07 18:18:03 +0400 |
commit | b07d7d348a728fc54991320ff7bc882f341478af (patch) | |
tree | 992fcbb4e334c4ca1c8d997de6b2a7be01ac89e1 | |
parent | 7099da8058b5ca6ed681745e8049d095fd38294e (diff) |
fdo#49421: do not divide by zero when scrollbar cannot be moved
Change-Id: I63338f6c2cfa3d206260b536a44de3d51fcd5710
-rw-r--r-- | vcl/source/control/scrbar.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 44a093bb9fcb..78e05fd55157 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -63,6 +63,8 @@ using ::rtl::OUString; static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator ) { + if (!nDenominator) + return 0; double n = ((double)nNumber * (double)nNumerator) / (double)nDenominator; return (long)n; } |