Crash fix in FSPanelAreaSearchList::onContextMenuItemEnable

master
Ansariel 2014-02-04 23:08:57 +01:00
parent 5e12258bff
commit 1f46c7387c
1 changed files with 1 additions and 1 deletions

View File

@ -1502,7 +1502,7 @@ bool FSPanelAreaSearchList::onContextMenuItemEnable(const LLSD& userdata)
// return true if the object is within the draw distance.
LLUUID object_id = mResultList->getFirstSelected()->getUUID();
LLViewerObject* objectp = gObjectList.findObject(object_id);
return dist_vec_squared(gAgent.getPositionGlobal(), objectp->getPositionGlobal()) < gAgentCamera.mDrawDistance * gAgentCamera.mDrawDistance;
return (objectp && dist_vec_squared(gAgent.getPositionGlobal(), objectp->getPositionGlobal()) < gAgentCamera.mDrawDistance * gAgentCamera.mDrawDistance);
}
else if (parameter == "script")
{