forked from mirror/openmw-tes3mp
[Client] Ensure that objects searched for have a valid reference number
This commit is contained in:
parent
92553b8e29
commit
f6d36d5d80
1 changed files with 4 additions and 0 deletions
|
@ -526,6 +526,10 @@ namespace MWWorld
|
||||||
*/
|
*/
|
||||||
Ptr CellStore::searchExact (unsigned int refNumIndex, unsigned int mpNum)
|
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;
|
SearchExactVisitor<MWWorld::Ptr> searchVisitor;
|
||||||
searchVisitor.mRefNumIndexToFind = refNumIndex;
|
searchVisitor.mRefNumIndexToFind = refNumIndex;
|
||||||
searchVisitor.mMpNumToFind = mpNum;
|
searchVisitor.mMpNumToFind = mpNum;
|
||||||
|
|
Loading…
Reference in a new issue