diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 41051a981aa4..673cbea84c50 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -329,7 +329,7 @@ SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem const* pS SfxItemPool* pMasterPool(rPool.GetMasterPool()); assert(nullptr != pMasterPool); SfxItemPool* pTargetPool(pMasterPool); - while (!pTargetPool->IsInRange(nWhich)) + while (pTargetPool && !pTargetPool->IsInRange(nWhich)) pTargetPool = pTargetPool->GetSecondaryPool(); // if this goes wrong, an Item with invalid ID for this pool is