* BufferView.cpp (gotoLabel):

- stop iterating over the list of labels after the label was found.
	  This also prevents a crash if the found label is in a child (and the
	  pointers become invalid) [bug 6252].

Trunk already has this change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31503 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-10-04 10:31:09 +00:00
parent 0d5967a50d
commit e215fa5131
2 changed files with 6 additions and 1 deletions

View File

@ -1874,8 +1874,10 @@ void BufferView::gotoLabel(docstring const & label)
TocIterator toc_it = toc.begin();
TocIterator end = toc.end();
for (; toc_it != end; ++toc_it) {
if (label == toc_it->str())
if (label == toc_it->str()) {
dispatch(toc_it->action());
break;
}
}
//FIXME: We could do a bit more searching thanks to this:
//InsetLabel const * inset = buffer_.insetLabel(label);

View File

@ -121,6 +121,8 @@ What's new
- Fix a crash when closing a window after a document was opened
multiple times and each time a new window was opened (bug 6188).
- Fix a crash when navigating to a label in a child document (bug 6252).
- Fix a number of assertions when displaying error messages (bug 6205).
- Fix bad allocation exception when displaying long tool tips (bug 6215).
@ -156,6 +158,7 @@ What's new
- Fix Ctrl-Shift-Tab shortcut for tabs (bug 6194).
* DOCUMENTATION AND LOCALIZATION
- Fix the compilation of the example file powerdot-example.lyx with