mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Gracefully return a value if an invalid author is requested
This commit is contained in:
parent
aea5e80f45
commit
0bd907b7b8
@ -118,8 +118,8 @@ void AuthorList::recordCurrentAuthor(Author const & a)
|
||||
|
||||
Author const & AuthorList::get(int id) const
|
||||
{
|
||||
// LASSERT: What should we do here?
|
||||
LASSERT(id < (int)authors_.size() , /**/);
|
||||
// authors_[0] is guaranteed to exist
|
||||
LASSERT(id < (int)authors_.size() , return authors_[0]);
|
||||
return authors_[id];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user