Skip to content

Commit

Permalink
Static analysis fix: dereference of a NULL pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 20, 2014
1 parent b99a625 commit 84b919a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -1464,9 +1464,7 @@ - (void)resetCursorRects
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
}

if ( window->flags & SDL_WINDOW_FULLSCREEN ) {
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;

if ( data && (window->flags & SDL_WINDOW_FULLSCREEN) ) {
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
/* OpenGL is rendering to the window, so make it visible! */
[data->nswindow setLevel:CGShieldingWindowLevel()];
Expand Down

0 comments on commit 84b919a

Please sign in to comment.