]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.cpp
Make sure that UpdateLocker is used correctly in the future
[lyx.git] / src / TocBackend.cpp
index c8bf4adf4853a96911596e1f1b042e416fd0d37e..f46b3c8418ba6c0514d5708c107cdde8f77b8873 100644 (file)
@@ -105,7 +105,7 @@ Toc const & TocBackend::toc(string const & type) const
 {
        // Is the type already supported?
        TocList::const_iterator it = tocs_.find(type);
-       LASSERT(it != tocs_.end(), /**/);
+       LASSERT(it != tocs_.end(), { static Toc dummy; return dummy; });
 
        return it->second;
 }
@@ -182,7 +182,8 @@ TocIterator TocBackend::item(string const & type,
 {
        TocList::const_iterator toclist_it = tocs_.find(type);
        // Is the type supported?
-       LASSERT(toclist_it != tocs_.end(), /**/);
+       // We will try to make the best of it in release mode
+       LASSERT(toclist_it != tocs_.end(), toclist_it = tocs_.begin());
        return toclist_it->second.item(dit);
 }