diff options
author | Sebastian Geerken <devnull@localhost> | 2014-09-26 19:39:38 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-09-26 19:39:38 +0200 |
commit | 54956409093f4a8b8327ad784c97cd49c968f4ff (patch) | |
tree | 5d6e0763f77cb3732ae5a3413731f0d36e9da41b | |
parent | ae97a4ed13f0d249dd6181ab74290a2839300da7 (diff) |
Fixed segfault in OOFAwareWidgetIterator.
-rw-r--r-- | dw/oofawarewidget_iterator.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dw/oofawarewidget_iterator.cc b/dw/oofawarewidget_iterator.cc index 119222c9..83446d7f 100644 --- a/dw/oofawarewidget_iterator.cc +++ b/dw/oofawarewidget_iterator.cc @@ -146,11 +146,12 @@ bool OOFAwareWidget::OOFAwareWidgetIterator::next () content.type = Content::END; r = false; cancel = true; - } else + } else { index = 0; + getPart (sectionIndex, index, &content); + } } - getPart (sectionIndex, index, &content); } while (!cancel && (content.type & getMask()) == 0); } @@ -199,11 +200,11 @@ bool OOFAwareWidget::OOFAwareWidgetIterator::prev () content.type = Content::START; r = false; cancel = true; - } else + } else { index = numParts (sectionIndex) - 1; - } - - getPart (sectionIndex, index, &content); + getPart (sectionIndex, index, &content); + } + } } while (!cancel && (content.type & getMask()) == 0); } |