summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unostyle.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 84d71489b8cb..710150628680 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1876,7 +1876,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
}
}
- if(!pCharFmt)
+ if(!pCharFmt && pBasePool)
{
SfxStyleSheetBase* pBase;
@@ -2026,14 +2026,17 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name );
- pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
bool bStyleFound = false;
- const SfxStyleSheetBase* pBase = pBasePool->First();
- while (pBase && !bStyleFound)
+ if (pBasePool)
{
- if(pBase->GetName() == aStyleName)
- bStyleFound = true;
- pBase = pBasePool->Next();
+ pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
+ const SfxStyleSheetBase* pBase = pBasePool->First();
+ while (pBase && !bStyleFound)
+ {
+ if(pBase->GetName() == aStyleName)
+ bStyleFound = true;
+ pBase = pBasePool->Next();
+ }
}
if (nIdx == -1 || !bStyleFound)