diff options
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index f399545f5249..2cfabba06da1 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -906,7 +906,8 @@ void SfxCommonTemplateDialog_Impl::EnableTreeDrag(bool bEnable) { if (pStyleSheetPool) { - SfxStyleSheetBase* pStyle = pStyleSheetPool->First(pStyleSheetPool->GetSearchFamily()); + const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl(); + SfxStyleSheetBase* pStyle = pItem ? pStyleSheetPool->First(pItem->GetFamily()) : nullptr; bAllowReParentDrop = pStyle && pStyle->HasParentSupport() && bEnable; } bTreeDrag = bEnable; |