Commit e2119246 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Make WineOpenGLContext hold a strong reference to its view.

Its superclass, NSOpenGLContext, only holds a weak reference. The view was sometimes being deallocated before the context was disposed of, resulting in crashes.
parent 2963a2d4
......@@ -35,10 +35,26 @@
- (void) dealloc
{
[[self view] release];
[latentView release];
[super dealloc];
}
- (void) setView:(NSView*)newView
{
NSView* oldView = [self view];
[super setView:newView];
[newView retain];
[oldView release];
}
- (void) clearDrawable
{
NSView* oldView = [self view];
[super clearDrawable];
[oldView release];
}
/* On at least some versions of Mac OS X, -[NSOpenGLContext clearDrawable] has the
undesirable side effect of ordering the view's GL surface off-screen. This isn't
done when just changing the context's view to a different view (which I would
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment