Kaydet (Commit) 9a764145 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst e04fd8a9
...@@ -1169,7 +1169,7 @@ void SwPostItMgr::Delete(String aAuthor) ...@@ -1169,7 +1169,7 @@ void SwPostItMgr::Delete(String aAuthor)
aTmp.reserve( mvPostItFlds.size() ); aTmp.reserve( mvPostItFlds.size() );
for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; ++pPostIt) 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() ); aTmp.push_back( (*pPostIt)->GetFmtFld() );
} }
for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i != aTmp.end() ; ++i) for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i != aTmp.end() ; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment