Handle case when index < 0

pull/469/head
Andrei Kortunov 6 years ago
parent 770d86f9bd
commit c0bed0fde2

@ -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…
Cancel
Save