cid#1585309 Dereference before null check
Change-Id: I49ab7a48e74055264037d6930692fdae8be6d3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162022 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user