mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
Handle case when index < 0
This commit is contained in:
parent
770d86f9bd
commit
c0bed0fde2
@ -161,6 +161,12 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(index != -1);
|
assert(index != -1);
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
mSelected = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mSelected = &mKey[index];
|
mSelected = &mKey[index];
|
||||||
|
|
||||||
// prevent reallocation of zero key from Type_HandToHand
|
// prevent reallocation of zero key from Type_HandToHand
|
||||||
|
Loading…
x
Reference in New Issue
Block a user