[Libreoffice-commits] .: sd/source
David Tardon
dtardon at kemper.freedesktop.org
Tue Jan 11 00:45:04 PST 2011
sd/source/ui/toolpanel/controls/MasterPageContainer.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit d2dbb88c42507ab20bb145818a26d18d614a51d6
Author: David Tardon <dtardon at redhat.com>
Date: Tue Jan 11 08:33:46 2011 +0100
rhbz#668654 avoid division by 0
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index b46dc32..d281bee 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -711,8 +711,11 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel (void)
if (*iDescriptor!=NULL && (*iDescriptor)->mpMasterPage != NULL)
{
Size aPageSize ((*iDescriptor)->mpMasterPage->GetSize());
- nWidth = aPageSize.Width();
- nHeight = aPageSize.Height();
+ OSL_ASSERT(aPageSize.Width() > 0 && aPageSize.Height() > 0);
+ if (aPageSize.Width() > 0)
+ nWidth = aPageSize.Width();
+ if (aPageSize.Height() > 0)
+ nHeight = aPageSize.Height();
mbFirstPageObjectSeen = true;
break;
}
More information about the Libreoffice-commits
mailing list