summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2011-08-30 13:30:18 -0500
committerAndrew A. de Laix <alain@lindenlab.com>2011-08-30 13:30:18 -0500
commitf08de06bf223c9876bd7495e36f61b19022938a7 (patch)
treec0a3e4bdf15a96582792df39e02c5c4bdcc55052 /indra
parent12dbf4c7b4a7bf64acaa7207c8bceffb64f021b3 (diff)
fix crash bug; exclude root from path.
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llview.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 474b568a87..0c8e3bace4 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -433,13 +433,20 @@ BOOL LLView::isInEnabledChain() const
static void buildPathname(std::ostream& out, const LLView* view)
{
- if (view)
+ if (view == 0) return;
+
+ if (view->getParent() != 0)
{
- // While we're not yet at root level, keep recurring towards top
buildPathname(out, view->getParent());
+
+ // Build pathname into ostream on the way back from recursion.
+ out << '/' << view->getName();
}
- // Build pathname into ostream on the way back from recursion.
- out << '/' << view->getName();
+ else
+ {
+ ; // Don't include root in the path.
+ }
+
}
std::string LLView::getPathname() const