mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- Fixed: TMap::DelKey failed if the key's main position was nil, because it tried checking
for it at the "next" position, which is an invalid pointer in that case. SVN r2236 (trunk)
This commit is contained in:
parent
41df8242c1
commit
d1f9b94743
1 changed files with 5 additions and 1 deletions
|
@ -730,7 +730,11 @@ protected:
|
||||||
Node *mp = MainPosition(key), **mpp;
|
Node *mp = MainPosition(key), **mpp;
|
||||||
HashTraits Traits;
|
HashTraits Traits;
|
||||||
|
|
||||||
if (!mp->IsNil() && !Traits.Compare(mp->Pair.Key, key)) /* the key is in its main position */
|
if (mp->IsNil())
|
||||||
|
{
|
||||||
|
/* the key is definitely not present, because there is nothing at its main position */
|
||||||
|
}
|
||||||
|
else if (!Traits.Compare(mp->Pair.Key, key)) /* the key is in its main position */
|
||||||
{
|
{
|
||||||
if (mp->Next != NULL) /* move next node to its main position */
|
if (mp->Next != NULL) /* move next node to its main position */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue