From b1179978f52c80a962f4be420246a9724b826e53 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 12 May 2010 11:41:36 +0000 Subject: [PATCH] From Stephan Huber, "attached you'll find a fix for a crash when closeImplementation gets called more than once." --- src/osgViewer/PixelBufferCarbon.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; }