diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-05 12:14:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-05 15:37:02 +0200 |
commit | 4ce4d8e0d64867a47a8c7355894f6ae3d576db6d (patch) | |
tree | 13f364c5711841315b682391ba1d2611e932c817 /sw | |
parent | dc9771d36ec48c9d6a9d60cfb580469a80136f60 (diff) |
we want to invalidate the current iterator
if there isn't one we shouldn't need to create one to invalidate it
Change-Id: Ia936f71c18c45d8e08f013ffa143c196109495ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 3d3d2699491e..b2d431310daf 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -3189,7 +3189,8 @@ void SwStyleSheetIterator::AppendStyleList(const std::vector<OUString>& rList, void SwDocStyleSheetPool::InvalidateIterator() { - dynamic_cast<SwStyleSheetIterator&>(GetIterator_Impl(GetSearchFamily(), GetSearchMask())).InvalidateIterator(); + if (SfxStyleSheetIterator* pIter = GetCachedIterator()) + dynamic_cast<SwStyleSheetIterator&>(*pIter).InvalidateIterator(); } void SwStyleSheetIterator::InvalidateIterator() |