]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5285 .
[lyx.git] / src / Text2.cpp
index 9dfcfe1c2e28768e1d9af3c732fa2ca386afc17d..fbb12222c7094337448c6df13a125311f61d1682 100644 (file)
@@ -90,7 +90,7 @@ FontInfo Text::layoutFont(Buffer const & buffer, pit_type const pit) const
                // now, because Inset::getLayout() will return a default-constructed
                // InsetLayout, and that e.g. sets the foreground color to red. So we
                // need to do some work to make that possible.
-               InsetCollapsable const * icp = pars_[pit].inInset()->asInsetCollapsable();
+               InsetCollapsable const * icp = pars_[pit].inInset().asInsetCollapsable();
                if (!icp)
                        return lf;
                FontInfo icf = icp->getLayout().font();
@@ -117,7 +117,8 @@ FontInfo Text::labelFont(Buffer const & buffer, Paragraph const & par) const
                // In case the default family has been customized
                if (layout.labelfont.family() == INHERIT_FAMILY)
                        lf.setFamily(buffer.params().getFont().fontInfo().family());
-               InsetCollapsable const * icp = par.inInset()->asInsetCollapsable();
+               // FIXME As above....
+               InsetCollapsable const * icp = par.inInset().asInsetCollapsable();
                if (!icp)
                        return lf;
                FontInfo icf = icp->getLayout().labelfont();