From 977ee9d8ea1a210af9cc55d3f1a9c048812a9724 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Thu, 9 Jun 2011 21:44:38 +0200 Subject: [PATCH] Exit the window finder loop if a window is found that is it's own parent. --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)