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

Maybe fix a bizarre nullptr crash?

parent 83b10128
No related branches found
No related tags found
No related merge requests found
...@@ -356,6 +356,7 @@ void LLHUDText::updateVisibility() ...@@ -356,6 +356,7 @@ void LLHUDText::updateVisibility()
mPositionAgent = gAgent.getPosAgentFromGlobal(mPositionGlobal); mPositionAgent = gAgent.getPosAgentFromGlobal(mPositionGlobal);
#if 0
if (!mSourceObject) if (!mSourceObject)
{ {
//LL_WARNS() << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL; //LL_WARNS() << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL;
...@@ -370,9 +371,10 @@ void LLHUDText::updateVisibility() ...@@ -370,9 +371,10 @@ void LLHUDText::updateVisibility()
} }
return; return;
} }
#endif
// Not visible if parent object is dead // Not visible if parent object is dead
if (mSourceObject->isDead()) if (!mSourceObject || mSourceObject->isDead())
{ {
mVisible = FALSE; mVisible = FALSE;
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