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
This commit is contained in:
parent
cf955c6212
commit
cf0ef68185
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user