diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index d8a104dda4..00bb882a14 100644 --- a/src/frontends/qt4/GuiInfo.cpp +++ b/src/frontends/qt4/GuiInfo.cpp @@ -52,8 +52,12 @@ void GuiInfo::on_closePB_clicked() InsetInfo * GuiInfo::inset() const { - return static_cast(bufferview()->cursor(). - innerInsetOfType(INFO_CODE)); + Inset * ins = bufferview()->cursor().innerInsetOfType(INFO_CODE); + if (!ins) + ins = bufferview()->cursor().nextInset(); + if (ins->lyxCode() != INFO_CODE) + return 0; + return static_cast(ins); }