Skip to content
Snippets Groups Projects
Commit f96c6ca5 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix crash

parent 79e1a2ce
No related branches found
No related tags found
No related merge requests found
...@@ -251,15 +251,17 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) ...@@ -251,15 +251,17 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void LLViewerJointAttachment::removeObject(LLViewerObject *object) void LLViewerJointAttachment::removeObject(LLViewerObject *object)
{ {
attachedobjs_vec_t::iterator iter; attachedobjs_vec_t::iterator iter, end;
for (LLViewerObject* attached_object : mAttachedObjects) end = mAttachedObjects.end();
for (iter = mAttachedObjects.begin(); iter != end; ++iter)
{ {
LLViewerObject* attached_object = iter->get();
if (attached_object == object) if (attached_object == object)
{ {
break; break;
} }
} }
if (iter == mAttachedObjects.end()) if (iter == end)
{ {
LL_WARNS() << "Could not find object to detach" << LL_ENDL; LL_WARNS() << "Could not find object to detach" << LL_ENDL;
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment