diff src/video/SDL_video.c @ 4871:81a6a9f396ba

The title is stored internally as NULL if it's empty, and returned as ""
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Aug 2010 16:26:35 -0700
parents 7b1d35d98294
children 231f8a1c5edd
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sun Aug 29 16:05:34 2010 -0700
+++ b/src/video/SDL_video.c	Sun Aug 29 16:26:35 2010 -0700
@@ -1098,7 +1098,7 @@
     if (window->title) {
         SDL_free(window->title);
     }
-    if (title) {
+    if (title && *title) {
         window->title = SDL_strdup(title);
     } else {
         window->title = NULL;
@@ -1114,7 +1114,7 @@
 {
     CHECK_WINDOW_MAGIC(window, NULL);
 
-    return window->title;
+    return window->title ? window->title : "";
 }
 
 void