commit 311a40747e4a4348e56fc9e56345026efd895915
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Jul 6 14:14:43 2017 +0200

    Remove test that is not needed.
    
    We know that buf is not null at this point.
    
    Spotted by coverity.
---
 src/BufferList.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/BufferList.cpp b/src/BufferList.cpp
index cec9d2d..bcdec59 100644
--- a/src/BufferList.cpp
+++ b/src/BufferList.cpp
@@ -98,7 +98,7 @@ void BufferList::release(Buffer * buf)
        BufferStorage::iterator const it =
                find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
-               Buffer const * parent = buf ? buf->parent() : 0;
+               Buffer const * parent = buf->parent();
                Buffer * tmp = (*it);
                bstore.erase(it);
                LASSERT(tmp, return);

Reply via email to