[Commits] SDL: Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"

libsdl.org revision control commits-owner at libsdl.org
Sun Jul 5 15:42:59 PDT 2015


details:   https://hg.libsdl.org/SDL/rev/e0db4fedf80c
changeset: 9796:e0db4fedf80c
user:      David Ludwig <dludwig at pobox.com>
date:      Sat Jul 04 21:04:49 2015 -0400
description:
Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"

diffstat:

 src/video/cocoa/SDL_cocoawindow.m |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 63c4d6f1f85f -r e0db4fedf80c src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Sat Jul 04 14:09:09 2015 -0400
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sat Jul 04 21:04:49 2015 -0400
@@ -1428,7 +1428,7 @@
 { @autoreleasepool
 {
     if (SetWindowStyle(window, GetWindowStyle(window))) {
-        if (bordered) {
+        if (bordered && window->title) {
             Cocoa_SetWindowTitle(_this, window);  /* this got blanked out. */
         }
     }
@@ -1499,7 +1499,7 @@
     s_moveHack = SDL_GetTicks();
 
     /* When the window style changes the title is cleared */
-    if (!fullscreen) {
+    if (!fullscreen && window->title) {
         Cocoa_SetWindowTitle(_this, window);
     }
 


More information about the commits mailing list