mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix crash when pressing Down in command buffer and the history is empty
(reported by John McCabe-Dansted's monkey test) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30107 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8bda8d10b8
commit
471e25647f
@ -248,7 +248,8 @@ void GuiCommandBuffer::down()
|
||||
if (!h.empty())
|
||||
edit_->setText(toqstr(h));
|
||||
|
||||
downPB->setEnabled(history_pos_ != history_.end()-1);
|
||||
downPB->setEnabled(!history_.empty()
|
||||
&& history_pos_ != history_.end() - 1);
|
||||
upPB->setEnabled(history_pos_ != history_.begin());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user