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:
Caolán McNamara
2024-01-13 22:08:50 +01:00
parent 49cc32842a
commit 2da65b3c04
+1 -1
View File
@@ -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