]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTOC.cpp
Fix crash after undo following replacement of a multicell selection (#8973).
[lyx.git] / src / insets / InsetTOC.cpp
index 07efc6509fc1fd45c8f378dd2502d223f9b5f87e..fc1f42bcae86ab8c3cb0d41e136d1e62bea65b48 100644 (file)
@@ -232,11 +232,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
        string const & command = getCmdName();
        if (command != "tableofcontents" && command != "lstlistoflistings") {
                LYXERR0("TOC type " << command << " not yet implemented.");
-               LASSERT(false, /* */);
-               return docstring();
+               LASSERT(false, return docstring());
        }
 
-       Toc const & toc = buffer().tocBackend().toc(cmd2type(command));
+       Toc const & toc = buffer().masterBuffer()->tocBackend().toc(cmd2type(command));
        if (toc.empty())
                return docstring();