summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2012-11-01 15:00:50 +0200
committermaxim_productengine <mnikolenko@productengine.com>2012-11-01 15:00:50 +0200
commitd886d89f53267d9a9a02c775fcb16e667278b904 (patch)
tree9ce23fb7324d19fa04263e23e20272d021be6f60 /indra
parent8afae2b74bb98af33447137ff033f2e34fed0d5f (diff)
CHUI-446 FIXED Checkm mParent before using dynamic_cast
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llconversationmodel.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 33631a027b..47a82bfe17 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -428,14 +428,16 @@ void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_nam
mName = (av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername);
mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName);
mNeedsRefresh = true;
- LLConversationItemSession* parent_session = dynamic_cast<LLConversationItemSession*>(mParent);
- if (parent_session != NULL)
+ if(mParent != NULL)
{
- parent_session->requestSort();
- parent_session->updateParticipantName(this);
- postEvent("update_participant", parent_session, this);
+ LLConversationItemSession* parent_session = dynamic_cast<LLConversationItemSession*>(mParent);
+ if (parent_session != NULL)
+ {
+ parent_session->requestSort();
+ parent_session->updateParticipantName(this);
+ postEvent("update_participant", parent_session, this);
+ }
}
-
}
void LLConversationItemParticipant::dumpDebugData()