]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
small simplification
[lyx.git] / src / BufferList.cpp
index cbb7f0a4569fa6296255f5abe08212a40387f225..a7f9661b0684b7fc700df811cc8f432492a2c0b9 100644 (file)
@@ -262,7 +262,7 @@ Buffer * BufferList::last()
 }
 
 
-Buffer * BufferList::getBuffer(unsigned int const choice)
+Buffer * BufferList::getBuffer(unsigned int choice)
 {
        if (choice >= bstore.size())
                return 0;
@@ -330,7 +330,9 @@ void BufferList::emergencyWrite(Buffer * buf)
 {
        // Use ::assert to avoid a loop, BOOST_ASSERT ends up calling ::assert
        // compare with 0 to avoid pointer/interger comparison
-       assert(buf != 0);
+       // ::assert(buf != 0);
+       if (!buf)
+               return;
 
        // No need to save if the buffer has not changed.
        if (buf->isClean())