Kaydet (Commit) 897aa4fa authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Tools container rework regression fix (for fdo#41657)

Don't de-reference invalid iterator (and no point in doing anything
with an empty style sheet list anyway).
üst d93196c8
...@@ -681,24 +681,26 @@ void SdStyleSheetPool::CopyLayoutSheets(const String& rLayoutName, SdStyleSheetP ...@@ -681,24 +681,26 @@ void SdStyleSheetPool::CopyLayoutSheets(const String& rLayoutName, SdStyleSheetP
std::vector<SfxStyleSheetBase*> aOutlineSheets; std::vector<SfxStyleSheetBase*> aOutlineSheets;
CreateOutlineSheetList(rLayoutName,aOutlineSheets); CreateOutlineSheetList(rLayoutName,aOutlineSheets);
std::vector<SfxStyleSheetBase*>::iterator it = aOutlineSheets.begin(); if( !aOutlineSheets.empty() )
SfxStyleSheetBase* pParent = *it;
++it;
while (it != aOutlineSheets.end())
{ {
pSheet = *it; std::vector<SfxStyleSheetBase*>::iterator it = aOutlineSheets.begin();
SfxStyleSheetBase* pParent = *it;
++it;
if (!pSheet) while (it != aOutlineSheets.end())
break; {
pSheet = *it;
if (pSheet->GetParent().Len() == 0) if (!pSheet)
pSheet->SetParent(pParent->GetName()); break;
pParent = pSheet; if (pSheet->GetParent().Len() == 0)
pSheet->SetParent(pParent->GetName());
++it; pParent = pSheet;
++it;
}
} }
} }
......
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