src/SDL_compat.c
changeset 2037 6bb97f41ab4b
parent 1985 8055185ae4ed
child 2058 38148947fdcf
--- a/src/SDL_compat.c	Fri Sep 22 21:52:20 2006 +0000
+++ b/src/SDL_compat.c	Sat Sep 23 22:51:37 2006 +0000
@@ -692,14 +692,17 @@
 {
     if (wm_title) {
         SDL_free(wm_title);
+    }
+    if (title) {
+        wm_title = SDL_strdup(title);
     } else {
-        wm_title = SDL_strdup(title);
+        wm_title = NULL;
     }
     SDL_SetWindowTitle(SDL_VideoWindow, wm_title);
 }
 
 void
-SDL_WM_GetCaption(char **title, char **icon)
+SDL_WM_GetCaption(const char **title, const char **icon)
 {
     if (title) {
         *title = wm_title;