]> git.lyx.org Git - features.git/commitdiff
Initialize ScopeBuffer::buffer member in constructor
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jun 2016 14:34:25 +0000 (16:34 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jun 2016 14:34:25 +0000 (16:34 +0200)
Found by Coverity.

src/Buffer.cpp

index 084b94c03f7d6ccba50e3f01868218c4d737e275..9b92d8af63a966d03afe3140672d29b9699c7673 100644 (file)
@@ -236,8 +236,8 @@ public:
        /// positions of child buffers in the buffer
        typedef map<Buffer const * const, DocIterator> BufferPositionMap;
        struct ScopeBuffer {
-               ScopeBuffer() {}
-               ScopeBuffer(DocIterator const & s,Buffer const * b)
+               ScopeBuffer() : buffer(0) {}
+               ScopeBuffer(DocIterator const & s, Buffer const * b)
                        : scope(s), buffer(b) {}
                DocIterator scope;
                Buffer const * buffer;