From f08de06bf223c9876bd7495e36f61b19022938a7 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 30 Aug 2011 13:30:18 -0500 Subject: fix crash bug; exclude root from path. --- indra/llui/llview.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra') 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 -- cgit v1.2.3