Handle case when index < 0

remotes/1728160796594174844/tmp_0.7.0-alpha
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