Jump to content

Crash fix


Recommended Posts

Posted

2 functions

GameObject*
ObjectAccessor::GetGameObject(WorldObject const &u, uint64 guid)
{
   GameObject * ret = GetObjectInWorld(guid, (GameObject*)NULL);
   if(!ret)
       return NULL;
   if(ret->GetMapId() != u.GetMapId())
       ret = NULL;
   if(ret->GetInstanceId() != u.GetInstanceId())
       return NULL;
   return ret;
}

DynamicObject*
ObjectAccessor::GetDynamicObject(WorldObject const &u, uint64 guid)
{
   DynamicObject * ret = GetObjectInWorld(guid, (DynamicObject*)NULL);
   if(!ret)
       return NULL;
   if(ret->GetMapId() != u.GetMapId())
       ret = NULL;
   if(ret->GetInstanceId() != u.GetInstanceId())
       return NULL;
   return ret;
}

if(ret->GetMapId() != u.GetMapId())
       ret = NULL;

!!! ret = 0 and after this ret->GetInstanceId().

if(ret->GetInstanceId() != u.GetInstanceId())
       return NULL;

i think there should be

if(ret->GetMapId() != u.GetMapId())
        return NULL;

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use