diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-03 11:46:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-03 14:10:46 +0200 |
commit | 9a7641451dad5c73a936de5361aa3c3f148132d0 (patch) | |
tree | 0ae77a00f4910da22a5e2284a01d488bf01f752f /sw | |
parent | e04fd8a9e04156f0f653a21e00e6ad976fbe17b0 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/PostItMgr.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index a438ac0c865d..d035f3159f48 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) |