]> git.lyx.org Git - lyx.git/blobdiff - src/session.C
* support/os_unix.C (canAutoOpen, autoOpenFile): on Mac OS X, use
[lyx.git] / src / session.C
index 8ecbb5255dae7cfd18195a89f38556040971d619..7078a2a7342a29721e3656197860d0ca0b944d8e 100644 (file)
@@ -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();
 }