From f2674b291185aa88e0a910b302c03f0a1eecd41e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 24 May 2011 10:15:17 +0000 Subject: [PATCH] Fixed Coverity issue. CID 11695: Uninitialized pointer field (UNINIT_CTOR) Non-static class member _ximpl is not initialized in this constructor nor in any functions that it calls. --- src/osg/FrameBufferObject.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index 5604e5327..2f6ab825f 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -499,15 +499,20 @@ FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment& attachment) format = attachment._internalFormat; _ximpl = new Pimpl(Pimpl::RENDERBUFFER); _ximpl->renderbufferTarget = new osg::RenderBuffer(image->s(), image->t(), format); + return; } else { OSG_WARN<<"Error: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment&) passed an empty osg::Image, image must be allocated first."<