diff options
Diffstat (limited to 'cui/source/options/optcolor.cxx')
-rw-r--r-- | cui/source/options/optcolor.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index c42ba08a38f9..25b6596817f1 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1327,8 +1327,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) { nLastVisible++; //skip gaps where no controls exist for the related ColorConfigEntry - while(!aScrollWindow.aCheckBoxes[nLastVisible] && !aScrollWindow.aColorBoxes[nLastVisible] && - nLastVisible < nCount - 1 ) + while((nLastVisible < (nCount - 1)) && !aScrollWindow.aCheckBoxes[nLastVisible] && !aScrollWindow.aColorBoxes[nLastVisible]) nLastVisible++; if ( nLastVisible < nCount ) { |