From Colin McDonald and Robert Osfield, converted Traits::sharedContext from GraphicsContext* to osg:observer_ptr<GraphicsContext> to prevent dangling pointer issues.
This commit is contained in:
@@ -81,7 +81,7 @@ bool PixelBufferCarbon::realizeImplementation()
|
||||
AGLContext sharedContext = NULL;
|
||||
|
||||
// get any shared AGL contexts
|
||||
GraphicsHandleCarbon* graphicsHandleCarbon = dynamic_cast<GraphicsHandleCarbon*>(_traits->sharedContext);
|
||||
GraphicsHandleCarbon* graphicsHandleCarbon = dynamic_cast<GraphicsHandleCarbon*>(_traits->sharedContext.get());
|
||||
if (graphicsHandleCarbon)
|
||||
{
|
||||
sharedContext = graphicsHandleCarbon->getAGLContext();
|
||||
|
||||
Reference in New Issue
Block a user