From: Vincent van Ravesteijn Date: Mon, 10 Mar 2014 19:02:29 +0000 (+0100) Subject: Gracefully return a value if an invalid author is requested X-Git-Tag: 2.1.0rc1~55 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0bd907b7b830485d1768ce8e86b170b3da73af94;p=features.git Gracefully return a value if an invalid author is requested --- diff --git a/src/Author.cpp b/src/Author.cpp index 6c608327e1..d4061c64ea 100644 --- a/src/Author.cpp +++ b/src/Author.cpp @@ -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]; }