mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug 3177:
http://bugzilla.lyx.org/show_bug.cgi?id=3177 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16949 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
500a5f959f
commit
c0fad86431
@ -203,6 +203,9 @@ TocIterator const TocBackend::item(
|
||||
Toc const & toc_vector = toclist_it->second;
|
||||
TocIterator last = toc_vector.begin();
|
||||
TocIterator it = toc_vector.end();
|
||||
if (it == last)
|
||||
return it;
|
||||
|
||||
--it;
|
||||
|
||||
for (; it != last; --it) {
|
||||
|
@ -92,7 +92,7 @@ QModelIndex const QToc::getCurrentIndex()
|
||||
{
|
||||
vector<string> const & types = getTypes();
|
||||
TocIterator const it = getCurrentTocItem(types[type_]);
|
||||
if (!it->isValid()) {
|
||||
if (it == getContents(types[type_]).end() || !it->isValid()) {
|
||||
lyxerr[Debug::GUI] << "QToc::getCurrentIndex(): TocItem is invalid!" << endl;
|
||||
return QModelIndex();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user