summaryrefslogtreecommitdiff
path: root/svtools/source/control/ctrlbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/ctrlbox.cxx')
-rw-r--r--svtools/source/control/ctrlbox.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 0b1c67e31980..393eea9e80fd 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -343,7 +343,8 @@ namespace
gUserItemSz.setHeight(gUserItemSz.Height() / 10);
size_t nMaxDeviceHeight = SAL_MAX_INT16 / 2; // see limitXCreatePixmap
- gPreviewsPerDevice = nMaxDeviceHeight / gUserItemSz.Height();
+ assert(gUserItemSz.Height() != 0);
+ gPreviewsPerDevice = gUserItemSz.Height() == 0 ? 16 : nMaxDeviceHeight / gUserItemSz.Height();
}
}