sw/source/ui/uno/unotxdoc.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit cf0ef681854ad53a0bdeff31ff5c49c8c31da99b Author: Michael Stahl <mst...@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 ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits