summaryrefslogtreecommitdiff
path: root/indra/newview/llhints.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-04-01 16:42:46 -0700
committerRichard Linden <none@none>2011-04-01 16:42:46 -0700
commit88c5554a288d1785aa391dc5ff7b7897a7a724a9 (patch)
tree0305d5ce1f0bb5e544cd75275a137b372a08293d /indra/newview/llhints.cpp
parent774b9ac9f9f87af65a7356d7f9a25e204428d4aa (diff)
parent453b0c700a8712f7ff79434772296a487d38184a (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-social-2
Diffstat (limited to 'indra/newview/llhints.cpp')
-rw-r--r--indra/newview/llhints.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp
index 722d67caf9..b5e676e626 100644
--- a/indra/newview/llhints.cpp
+++ b/indra/newview/llhints.cpp
@@ -213,19 +213,22 @@ void LLHintPopup::draw()
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeInTime, 0.f, 1.f);
}
- LLIconCtrl& hint_icon = getChildRef<LLIconCtrl>("hint_image");
+ LLIconCtrl* hint_icon = findChild<LLIconCtrl>("hint_image");
- LLUIImagePtr hint_image = hint_icon.getImage();
- S32 image_height = hint_image.isNull() ? 0 : hint_image->getHeight();
- S32 image_width = hint_image.isNull() ? 0 : hint_image->getWidth();
+ if (hint_icon)
+ {
+ LLUIImagePtr hint_image = hint_icon.getImage();
+ S32 image_height = hint_image.isNull() ? 0 : hint_image->getHeight();
+ S32 image_width = hint_image.isNull() ? 0 : hint_image->getWidth();
- S32 delta_height = image_height - hint_icon.getParent()->getParent()->getRect().getHeight();
- hint_icon.getParent()->reshape(image_width, hint_icon.getParent()->getRect().getHeight());
- hint_icon.getParent()->getParent()->reshape(hint_icon.getParent()->getParent()->getRect().getWidth(), image_height);
- hint_icon.getParent()->getParent()->translate(0, -delta_height);
+ S32 delta_height = image_height - hint_icon.getParent()->getParent()->getRect().getHeight();
+ hint_icon.getParent()->reshape(image_width, hint_icon.getParent()->getRect().getHeight());
+ hint_icon.getParent()->getParent()->reshape(hint_icon.getParent()->getParent()->getRect().getWidth(), image_height);
+ hint_icon.getParent()->getParent()->translate(0, -delta_height);
- LLRect hint_rect = getLocalRect();
- reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height);
+ LLRect hint_rect = getLocalRect();
+ reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height);
+ }
{ LLViewDrawContext context(alpha);