]> git.lyx.org Git - features.git/commitdiff
fix assertion in Inset::getLayout when there is no buffer (bug #6497)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 9 Feb 2010 11:16:17 +0000 (11:16 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 9 Feb 2010 11:16:17 +0000 (11:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33377 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/Inset.cpp

index f626ca8ae448d2b4a08f12bb3442facd1205fe6f..b29737ac0086dc64e1c3a7543d7e9f45be0c15ac 100644 (file)
@@ -523,6 +523,8 @@ bool Inset::covers(BufferView const & bv, int x, int y) const
 
 InsetLayout const & Inset::getLayout() const
 {
+       if (!buffer_)
+               return DocumentClass::plainInsetLayout();
        return buffer().params().documentClass().insetLayout(name());
 }