Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-08-06 21:42:30 +0000
committerStijn Buys <ingar@osirion.org>2011-08-06 21:42:30 +0000
commitce680ab988559f1d4ae1fd5856cbd57283707f50 (patch)
treed3f00952c6353c9660eb0cb7edec2ba2f0ea0b32
parentabcf75a5abb45e44364b7b0205fe3f43d3692d6e (diff)
Prevent Widget::hide() from going into an endless loop.
-rw-r--r--src/ui/widget.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/widget.cc b/src/ui/widget.cc
index 4812b1f..709731e 100644
--- a/src/ui/widget.cc
+++ b/src/ui/widget.cc
@@ -153,7 +153,7 @@ void Widget::hide()
Widget *sibling = next_sibling();
- while (sibling && ((sibling == this) || !sibling->visible())) {
+ while (sibling && (sibling != this) && !sibling->visible()) {
sibling = sibling->next_sibling();
}
if (sibling)
@@ -289,9 +289,9 @@ Widget *Widget::next_sibling()
return 0;
}
- // find this widget in the parent's children
+ // find this widget in the parent's children
Children::iterator it = parent()->children().begin();
- while (it != parent()->children().end() && (*it) != this) {
+ while (it != parent()->children().end() && ((*it) != this)) {
it++;
}