Skip to content

Commit

Permalink
Checks for case which shouldn't happen
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 28, 2013
1 parent 9a51f6c commit 3d3033d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/rbtree.c
Expand Up @@ -446,7 +446,7 @@ static void rbtree_delete_internal(rbtree_t *tree, rbnode_t *Z, int skiplock)
Z->Data = Y->Data;
Y->Data = NULL;

if (Y->Color == Black)
if ((Y->Color == Black) && Parent)
DeleteFixup(tree, X, Parent);

/*
Expand Down

0 comments on commit 3d3033d

Please sign in to comment.