diff options
Diffstat (limited to 'src/jogl/native/macosx')
-rw-r--r-- | src/jogl/native/macosx/MacOSXWindowSystemInterface.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m index 5405ad4ee..cbfea6d71 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m @@ -476,7 +476,12 @@ void* createContext(void* shareContext, NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSView *nsView = (NSView*)view; + NSView *nsView = NULL; + NSObject *nsObj = (NSObject*) view; + + if( nsObj != NULL && [nsObj isKindOfClass:[NSView class]] ) { + nsView = (NSView*)nsObj; + } if (nsView != NULL) { |