diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0ab07c5e4..eeb69d79f 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1358,7 +1358,7 @@ LLFloater* LLFloater::getClosableFloaterFromFocus() // Find and close a parental floater that is closeable, if any. LLFloater* previous_floater = NULL; // Guard against endless loop, because getParentFloater(x) can return x! for(LLFloater* floater_to_close = focused_floater; - NULL != floater_to_close; + NULL != floater_to_close && floater_to_close != gFloaterView->getParentFloater(floater_to_close); floater_to_close = gFloaterView->getParentFloater(floater_to_close)) { if(floater_to_close == previous_floater)