]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Move isMultiCell() to Cursor, and use it.
[lyx.git] / src / insets / Inset.cpp
index ce754bd1fc53b92d45b78417b55a45b576f25e5b..095cdaa4823e1a5a7da021ffb0d730667118ae22 100644 (file)
 #include "Text.h"
 #include "TextClass.h"
 
-#include "frontends/Painter.h"
 #include "frontends/Application.h"
+#include "frontends/Painter.h"
 
-#include "support/lassert.h"
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/ExceptionMessage.h"
 #include "support/gettext.h"
+#include "support/lassert.h"
 
 #include <map>
 
@@ -94,7 +94,6 @@ static TranslatorMap const build_translator()
                InsetName("index_print", INDEX_PRINT_CODE),
                InsetName("nomencl_print", NOMENCL_PRINT_CODE),
                InsetName("optarg", OPTARG_CODE),
-               InsetName("environment", ENVIRONMENT_CODE),
                InsetName("newline", NEWLINE_CODE),
                InsetName("line", LINE_CODE),
                InsetName("branch", BRANCH_CODE),
@@ -151,7 +150,7 @@ Buffer const & Inset::buffer() const
 
 bool Inset::isBufferValid() const
 {
-       return theBufferList().isLoaded(buffer_);
+       return buffer_ && theBufferList().isLoaded(buffer_);
 }