summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
Diffstat (limited to 'uui')
-rw-r--r--uui/source/masterpasscrtdlg.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index d8844381f7a8..2c20991bdc59 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -115,9 +115,12 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
Rectangle aRect = aFTMasterPasswordWarning.GetTextRect( aLabelRect, aFTMasterPasswordWarning.GetText() );
long nNewLabelHeight = 0;
- for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight;
- nNewLabelHeight < aRect.GetHeight();
- nNewLabelHeight += nTextHeight ) ;
+ if ( nTextWidth > 0 )
+ {
+ for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight;
+ nNewLabelHeight < aRect.GetHeight();
+ nNewLabelHeight += nTextHeight );
+ }
long nDelta = nNewLabelHeight - nLabelHeight;
Size aNewDlgSize = GetSizePixel();