[Libreoffice-commits] .: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 8 08:49:45 PDT 2012
sw/source/ui/uno/unotxdoc.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit cf0ef681854ad53a0bdeff31ff5c49c8c31da99b
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Oct 8 17:45:49 2012 +0200
SwXTextDocument::getFlatParagraphIterator: fix crash:
Check if the document is still valid. Crash in idle handler grammar
checker observed on libreoffice-3-5 branch.
Change-Id: I3cae1c6726bb9ad5be11f59bc33f8550bbbe1883
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index ef09ecf..52d989d 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3033,6 +3033,12 @@ uno::Reference< text::XFlatParagraphIterator > SAL_CALL SwXTextDocument::getFlat
throw ( uno::RuntimeException )
{
SolarMutexGuard aGuard;
+ if (!IsValid())
+ {
+ throw DisposedException("SwXTextDocument not valid",
+ static_cast<XTextDocument*>(this));
+ }
+
return new SwXFlatParagraphIterator( *pDocShell->GetDoc(), nTextMarkupType, bAutomatic );
}
More information about the Libreoffice-commits
mailing list