diff --git a/src/osgViewer/PixelBufferCarbon.cpp b/src/osgViewer/PixelBufferCarbon.cpp index c995c3933..0e18de3b0 100644 --- a/src/osgViewer/PixelBufferCarbon.cpp +++ b/src/osgViewer/PixelBufferCarbon.cpp @@ -115,6 +115,11 @@ void PixelBufferCarbon::closeImplementation() if (_pbuffer) aglDestroyPBuffer(_pbuffer); if (_context) aglDestroyContext(_context); if (_pixelformat) aglDestroyPixelFormat(_pixelformat); + + _pbuffer = NULL; + _context = NULL; + _pixelformat = NULL; + _valid = _realized = false; }