]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Stupid bug fix.
[lyx.git] / src / insets / Inset.cpp
index 1b614ff0fede4f223637d484f7d4b4c3acd54d10..095cdaa4823e1a5a7da021ffb0d730667118ae22 100644 (file)
@@ -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_);
 }