On 03/27/2016 04:43 PM, Kornel Benko wrote: > Am Sonntag, 27. März 2016 um 16:33:12, schrieb Richard Heck <rgh...@lyx.org> >> On 03/27/2016 03:09 PM, Jean-Marc Lasgouttes wrote: >>> Le 27/03/2016 19:37, Jean-Marc Lasgouttes a écrit : >>>> I suspect a compiler bug. What is your compiler? Can you try another >>>> one? >>> I think I know what happens: in TextClass.cpp, we have >>> InsetLayout DocumentClass::plain_insetlayout_; >>> >>> The InsetLayout constructor says: >>> InsetLayout::InsetLayout() : >>> [...] >>> font_(inherit_font), >>> labelfont_(sane_font), bgcolor_(Color_error), >>> [...] >>> >>> inherit_font and sane_font are defined in FontInfo.cpp: >>> >>> FontInfo const sane_font( >>> ROMAN_FAMILY, >>> [...] >>> FONT_OFF); >>> >>> FontInfo const inherit_font( >>> INHERIT_FAMILY, >>> [...] >>> FONT_OFF); >>> >>> Therefore, if can happen than plain_insetlayout_ is initialized before >>> sane_font and inherit_font have been initialized, which creates the >>> problems that Kornel sees. >>> >>> What is the right construct to avoid this problem? >> Idea attached. >> >> Richard > Thanks Jean-Marc and Richard, this patch works for me.
Committed. Richard