aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-07-05 17:54:25 -0700
committerMcCabe Maxsted2011-07-05 17:54:25 -0700
commitff64af596bbd7fb50d3c28208e863eaf83b0a376 (patch)
treecd9ab3719dd8ddec18a2477234feb2551cbf8082 /linden
parentDon't crash if someone sends us a notecard they've managed to embed a calling... (diff)
downloadmeta-impy-ff64af596bbd7fb50d3c28208e863eaf83b0a376.zip
meta-impy-ff64af596bbd7fb50d3c28208e863eaf83b0a376.tar.gz
meta-impy-ff64af596bbd7fb50d3c28208e863eaf83b0a376.tar.bz2
meta-impy-ff64af596bbd7fb50d3c28208e863eaf83b0a376.tar.xz
Applied 0001-Fix-hang-in-LLFloater-getClosableFloaterFromFocus-2..patch by Makomk Makosen for #763: Possible infinite loop in LLFloater::getClosableFloaterFromFocus
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llui/llfloater.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index bb42ca3..58c717a 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -1368,6 +1368,7 @@ LLFloater* LLFloater::getClosableFloaterFromFocus()
1368 1368
1369 // The focused floater may not be closable, 1369 // The focused floater may not be closable,
1370 // Find and close a parental floater that is closeable, if any. 1370 // Find and close a parental floater that is closeable, if any.
1371 LLFloater* prev_floater = NULL;
1371 for(LLFloater* floater_to_close = focused_floater; 1372 for(LLFloater* floater_to_close = focused_floater;
1372 NULL != floater_to_close; 1373 NULL != floater_to_close;
1373 floater_to_close = gFloaterView->getParentFloater(floater_to_close)) 1374 floater_to_close = gFloaterView->getParentFloater(floater_to_close))
@@ -1376,6 +1377,15 @@ LLFloater* LLFloater::getClosableFloaterFromFocus()
1376 { 1377 {
1377 return floater_to_close; 1378 return floater_to_close;
1378 } 1379 }
1380
1381 // If floater has as parent root view
1382 // gFloaterView->getParentFloater(floater_to_close) returns
1383 // the same floater_to_close, so we need to check this.
1384 if (prev_floater == floater_to_close)
1385 {
1386 break;
1387 }
1388 prev_floater = floater_to_close;
1379 } 1389 }
1380 1390
1381 return NULL; 1391 return NULL;