mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Fixup c7496a11
: test emptiness before accessing elements
This commit is contained in:
parent
2fbce44401
commit
4d0c43f9aa
@ -612,7 +612,9 @@ void Undo::endUndoGroup(CursorData const & cur_after)
|
||||
|
||||
bool Undo::activeUndoGroup() const
|
||||
{
|
||||
return d->group_level_ > 0 && d->undostack_.top().group_id == d->group_id_;
|
||||
return d->group_level_ > 0
|
||||
&& !d->undostack_.empty()
|
||||
&& d->undostack_.top().group_id == d->group_id_;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user