Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"

This commit is contained in:
David Ludwig 2015-07-04 21:04:49 -04:00
parent 65a1a3e7e9
commit d0ba0c1d8a
1 changed files with 2 additions and 2 deletions

View File

@ -1428,7 +1428,7 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
{ @autoreleasepool { @autoreleasepool
{ {
if (SetWindowStyle(window, GetWindowStyle(window))) { if (SetWindowStyle(window, GetWindowStyle(window))) {
if (bordered) { if (bordered && window->title) {
Cocoa_SetWindowTitle(_this, window); /* this got blanked out. */ Cocoa_SetWindowTitle(_this, window); /* this got blanked out. */
} }
} }
@ -1499,7 +1499,7 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
s_moveHack = SDL_GetTicks(); s_moveHack = SDL_GetTicks();
/* When the window style changes the title is cleared */ /* When the window style changes the title is cleared */
if (!fullscreen) { if (!fullscreen && window->title) {
Cocoa_SetWindowTitle(_this, window); Cocoa_SetWindowTitle(_this, window);
} }