diff --git a/src/SFML/Window/OSX/InputImpl.mm b/src/SFML/Window/OSX/InputImpl.mm index 62fe7ee3c..02880be59 100644 --- a/src/SFML/Window/OSX/InputImpl.mm +++ b/src/SFML/Window/OSX/InputImpl.mm @@ -61,6 +61,7 @@ SFOpenGLView* GetSFOpenGLViewFromSFMLWindow(const Window& window) // Get our SFOpenGLView from ... SFOpenGLView* view = nil; + if ([nsHandle isKindOfClass:[NSWindow class]]) { // If system handle is a window then from its content view. view = [nsHandle contentView]; @@ -89,10 +90,13 @@ SFOpenGLView* GetSFOpenGLViewFromSFMLWindow(const Window& window) } } else { - - sf::Err() << "The system handle is neither a nor " - << "object. This shouldn't happen." - << std::endl; + if (nsHandle != 0) { + sf::Err() << "The system handle is neither a nor " + << "object. This shouldn't happen." + << std::endl; + } else { + // This probably means the SFML window was previously closed. + } }