diff options
author | sgeerken <devnull@localhost> | 2012-09-06 10:20:17 +0200 |
---|---|---|
committer | sgeerken <devnull@localhost> | 2012-09-06 10:20:17 +0200 |
commit | 40b56d7053cdd1824cc4fa2322a63367f90b2ff0 (patch) | |
tree | fe15c870a8e6020e69730fc3504e42d69fe8f7d8 /dw/textblock_linebreaking.cc | |
parent | 83aa6f47e22e6f659110b84e40283e0101df88d3 (diff) |
Fixed a SEGFAULT occurring when resizing the window.
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r-- | dw/textblock_linebreaking.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index 2e2a23c9..4e37104b 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -916,7 +916,12 @@ void Textblock::rewrap () calcWidgetSize (word->content.widget, &word->size); wordWrap (i, false); - + + // wordWrap() may insert some new words; since NotSoSimleVector + // is used for the words list, the internal structure may have + // changed, so getRef() must be called again. + word = words->getRef (i); + if (word->content.type == core::Content::WIDGET) { word->content.widget->parentRef = lines->size () - 1; } |