mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Handle case when index < 0
This commit is contained in:
parent
770d86f9bd
commit
c0bed0fde2
1 changed files with 6 additions and 0 deletions
|
@ -161,6 +161,12 @@ namespace MWGui
|
|||
}
|
||||
}
|
||||
assert(index != -1);
|
||||
if (index < 0)
|
||||
{
|
||||
mSelected = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
mSelected = &mKey[index];
|
||||
|
||||
// prevent reallocation of zero key from Type_HandToHand
|
||||
|
|
Loading…
Reference in a new issue