Fix for defect 211880. Code was accessing a NULL child block pointer, because parent block was incorrectly being set to NULL.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@994 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
dsandersoremutah
2006-10-17 20:54:52 +00:00
parent 9a5e53b182
commit e59bd5d689

View File

@@ -5344,6 +5344,10 @@ RCODE F_BTree::moveEntriesToNextBlock(
if( bCommonParent || (pParentStack->uiCurOffset <
(FLMUINT)(getNumKeys( pParentStack->pucBlock) - 1)))
{
if (pParentBlock)
{
pParentBlock->Release();
}
pParentBlock = pParentStack->pBlock;
pucParentBlock = pParentStack->pucBlock;
pParentBlock->AddRef();
@@ -5364,11 +5368,9 @@ RCODE F_BTree::moveEntriesToNextBlock(
}
pParentStack->pBlock = pParentBlock;
pParentStack->pBlock->AddRef();
pParentStack->pucBlock = pucParentBlock;
pParentBlock = NULL;
pucParentBlock = NULL;
bCommonParent = TRUE;
}
else