Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"
authorDavid Ludwig <dludwig@pobox.com>
Sat, 04 Jul 2015 21:04:49 -0400
changeset 9796e0db4fedf80c
parent 9795 63c4d6f1f85f
child 9797 c142db5785ad
Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sat Jul 04 14:09:09 2015 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sat Jul 04 21:04:49 2015 -0400
     1.3 @@ -1428,7 +1428,7 @@
     1.4  { @autoreleasepool
     1.5  {
     1.6      if (SetWindowStyle(window, GetWindowStyle(window))) {
     1.7 -        if (bordered) {
     1.8 +        if (bordered && window->title) {
     1.9              Cocoa_SetWindowTitle(_this, window);  /* this got blanked out. */
    1.10          }
    1.11      }
    1.12 @@ -1499,7 +1499,7 @@
    1.13      s_moveHack = SDL_GetTicks();
    1.14  
    1.15      /* When the window style changes the title is cleared */
    1.16 -    if (!fullscreen) {
    1.17 +    if (!fullscreen && window->title) {
    1.18          Cocoa_SetWindowTitle(_this, window);
    1.19      }
    1.20