X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsession.C;h=7078a2a7342a29721e3656197860d0ca0b944d8e;hb=f8f59e97fb06149528a180c5964c9abb27e079a1;hp=8ecbb5255dae7cfd18195a89f38556040971d619;hpb=ed99f752f9b4ce52cf55cac2a94658fb087c7383;p=lyx.git diff --git a/src/session.C b/src/session.C index 8ecbb5255d..7078a2a734 100644 --- a/src/session.C +++ b/src/session.C @@ -296,8 +296,10 @@ void BookmarksSection::save(FileName const & fname, int par_id, pos_type par_pos bool BookmarksSection::isValid(unsigned int i) const { - // i == 0, or in the queue - return i <= bookmarks.size(); + if (i == 0) + return !temp_bookmark.filename.empty(); + else + return i <= bookmarks.size() && !bookmarks[i-1].filename.empty(); }