[Client] Ensure that objects searched for have a valid reference number

0.6.1
David Cernat 7 years ago
parent 92553b8e29
commit f6d36d5d80

@ -526,6 +526,10 @@ namespace MWWorld
*/
Ptr CellStore::searchExact (unsigned int refNumIndex, unsigned int mpNum)
{
// Ensure that all objects searched for have a valid reference number
if (refNumIndex == 0 && mpNum == 0)
return 0;
SearchExactVisitor<MWWorld::Ptr> searchVisitor;
searchVisitor.mRefNumIndexToFind = refNumIndex;
searchVisitor.mMpNumToFind = mpNum;

Loading…
Cancel
Save