Handle case when index < 0

pull/1837/head
Andrei Kortunov 7 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