Static analysis fix: dereference of a NULL pointer.
parent
b99a6253da
commit
84b919a2a7
|
@ -1464,9 +1464,7 @@ Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||||
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
|
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( window->flags & SDL_WINDOW_FULLSCREEN ) {
|
if ( data && (window->flags & SDL_WINDOW_FULLSCREEN) ) {
|
||||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
|
||||||
|
|
||||||
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
|
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
|
||||||
/* OpenGL is rendering to the window, so make it visible! */
|
/* OpenGL is rendering to the window, so make it visible! */
|
||||||
[data->nswindow setLevel:CGShieldingWindowLevel()];
|
[data->nswindow setLevel:CGShieldingWindowLevel()];
|
||||||
|
|
Loading…
Reference in New Issue