mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
At least prevent the crash in #7152. Patch by John McCabe-Dansted, more
or less. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36780 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
be3625dceb
commit
3f40bb1432
@ -1455,14 +1455,20 @@ void GuiView::disconnectBufferView()
|
|||||||
|
|
||||||
void GuiView::errors(string const & error_type, bool from_master)
|
void GuiView::errors(string const & error_type, bool from_master)
|
||||||
{
|
{
|
||||||
|
BufferView const * const bv = currentBufferView();
|
||||||
|
if (!bv)
|
||||||
|
LASSERT(false, return);
|
||||||
|
|
||||||
ErrorList & el = from_master ?
|
ErrorList & el = from_master ?
|
||||||
currentBufferView()->buffer().masterBuffer()->errorList(error_type)
|
bv->buffer().masterBuffer()->errorList(error_type) :
|
||||||
: currentBufferView()->buffer().errorList(error_type);
|
bv->buffer().errorList(error_type);
|
||||||
|
if (el.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
string data = error_type;
|
string data = error_type;
|
||||||
if (from_master)
|
if (from_master)
|
||||||
data = "from_master|" + error_type;
|
data = "from_master|" + error_type;
|
||||||
if (!el.empty())
|
showDialog("errorlist", data);
|
||||||
showDialog("errorlist", data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user