Some cleanup and a fix for a potential crash while investigating #7572.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38858 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-05-27 19:47:10 +00:00
parent 9fbfebb641
commit 80cb1f7674
2 changed files with 9 additions and 2 deletions

View File

@ -2188,8 +2188,8 @@ int BufferView::scrollUp(int offset)
void BufferView::setCursorFromRow(int row)
{
int tmpid = -1;
int tmppos = -1;
int tmpid;
int tmppos;
buffer_.texrow().getIdFromRow(row, tmpid, tmppos);

View File

@ -2930,6 +2930,13 @@ bool GuiView::goToFileRow(string const & argument)
return false;
}
}
if (!buf) {
message(bformat(
_("No buffer for file `%1$s'."),
makeDisplayPath(file_name))
);
return false;
}
setBuffer(buf);
documentBufferView()->setCursorFromRow(row);
return true;