# HG changeset patch # User Sam Lantinga # Date 1283124395 25200 # Node ID 81a6a9f396ba0b4c934fdf2e1b575f1df50f073f # Parent d275c95ddc057851a911a89040689a881c160f7d The title is stored internally as NULL if it's empty, and returned as "" diff -r d275c95ddc05 -r 81a6a9f396ba src/video/SDL_video.c --- 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