src/video/quartz/SDL_QuartzWM.m
changeset 58 bd6b0a910a65
parent 47 45b1c4303f87
child 158 4382c38dfbee
--- a/src/video/quartz/SDL_QuartzWM.m	Mon Jun 11 00:08:35 2001 +0000
+++ b/src/video/quartz/SDL_QuartzWM.m	Mon Jun 11 06:44:43 2001 +0000
@@ -122,12 +122,19 @@
 
 static void QZ_SetCaption    (_THIS, const char *title, const char *icon) {
 
-    NSString *str = [ [ NSString alloc ] initWithCString:title ];
-    if (window != nil)
-        [ window setTitle:str ];
-
-    [ windowTitle release ];
-    windowTitle = str;
+    if ( window != nil ) {
+        NSString *string;
+        if ( title != NULL ) {
+            string = [ [ NSString alloc ] initWithCString:title ];
+            [ window setTitle:string ];
+            [ string release ];
+        }
+        if ( icon != NULL ) {
+            string = [ [ NSString alloc ] initWithCString:icon ];
+            [ window setMiniwindowTitle:string ];
+            [ string release ];
+        }
+    }
 }
 
 static void QZ_SetIcon       (_THIS, SDL_Surface *icon, Uint8 *mask) {