Exit the window finder loop if a window is found that is it's own parent.

This commit is contained in:
Siana Gearz
2011-06-09 21:44:38 +02:00
parent d06ea4d211
commit 977ee9d8ea

View File

@@ -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)