summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 17:59:01 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 17:59:01 +0000
commit664c659601a9e07d3002cfb65f1624ef24342f4a (patch)
tree69cf120266c0bd64ab5ccad96b5f7e3706261151 /indra
parent6e73357a866f0c9fdc8f482c9cffc0e409b76be0 (diff)
CID-87
Checker: FORWARD_NULL Function: LLLocationInputCtrl::refreshLocation() File: /indra/newview/lllocationinputctrl.cpp
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lllocationinputctrl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index ff713d74ad..f48c96190f 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -489,7 +489,10 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor)
*/
void LLLocationInputCtrl::setText(const LLStringExplicit& text)
{
- mTextEntry->setText(text);
+ if (mTextEntry)
+ {
+ mTextEntry->setText(text);
+ }
mHasAutocompletedText = FALSE;
}
@@ -498,7 +501,9 @@ void LLLocationInputCtrl::setFocus(BOOL b)
LLComboBox::setFocus(b);
if (mTextEntry && b && !mList->getVisible())
+ {
mTextEntry->setFocus(TRUE);
+ }
}
void LLLocationInputCtrl::handleLoginComplete()
@@ -688,8 +693,8 @@ void LLLocationInputCtrl::refreshLocation()
{
// Is one of our children focused?
if (LLUICtrl::hasFocus() || mButton->hasFocus() || mList->hasFocus() ||
- (mTextEntry && mTextEntry->hasFocus()) || (mAddLandmarkBtn->hasFocus()))
-
+ (mTextEntry && mTextEntry->hasFocus()) ||
+ (mAddLandmarkBtn->hasFocus()))
{
llwarns << "Location input should not be refreshed when having focus" << llendl;
return;