Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

The title is stored internally as NULL if it's empty, and returned as ""

  • Loading branch information
slouken committed Aug 29, 2010
1 parent 210300e commit ba18891541f057c1e8684792d8137fbbeaf6850b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/video/SDL_video.c
@@ -1098,7 +1098,7 @@ SDL_SetWindowTitle(SDL_Window * window, const char *title)
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 @@ SDL_GetWindowTitle(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, NULL);

return window->title;
return window->title ? window->title : "";
}

void

0 comments on commit ba18891

Please sign in to comment.