[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at suse.cz
Fri May 3 05:11:06 PDT 2013
sw/source/ui/docvw/PostItMgr.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 9a7641451dad5c73a936de5361aa3c3f148132d0
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri May 3 11:46:58 2013 +0200
SwPostItMgr::Delete: fix crash when layout is not yet ready
pPostIt is 0 when we have a large document, and the layout is not yet
ready for a later part of the document, having a comment. Just don't try
to delete such comments, better than a crash.
Change-Id: I5fd5c908bc7b1feba926214863e84391b9037484
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index a438ac0..d035f31 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -1169,7 +1169,7 @@ void SwPostItMgr::Delete(String aAuthor)
aTmp.reserve( mvPostItFlds.size() );
for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; ++pPostIt)
{
- if ((*pPostIt)->GetFmtFld() && ((*pPostIt)->pPostIt->GetAuthor() == aAuthor) )
+ if ((*pPostIt)->GetFmtFld() && (*pPostIt)->pPostIt && ((*pPostIt)->pPostIt->GetAuthor() == aAuthor) )
aTmp.push_back( (*pPostIt)->GetFmtFld() );
}
for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i != aTmp.end() ; ++i)
More information about the Libreoffice-commits
mailing list