From: Holger Schemel Date: Tue, 26 Sep 2017 15:08:59 +0000 (+0200) Subject: fixed assertion warning when building with SDL 2.0.6 for Android X-Git-Tag: 4.0.1.0~8 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b45533f737b46a9c490f79ca96a7ac994d55ca71;p=rocksndiamonds.git fixed assertion warning when building with SDL 2.0.6 for Android --- diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 3afecaf9..214859df 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -532,11 +532,7 @@ inline static void SDLInitVideoBuffer_VideoBuffer(boolean fullscreen) SDLSetWindowIcon(program.icon_filename); /* set window and icon title */ -#if defined(TARGET_SDL2) - SDL_SetWindowTitle(sdl_window, program.window_title); -#else - SDL_WM_SetCaption(program.window_title, program.window_title); -#endif + SDLSetWindowTitle(); } inline static void SDLInitVideoBuffer_DrawBuffer() @@ -830,6 +826,9 @@ boolean SDLSetVideoMode(boolean fullscreen) void SDLSetWindowTitle() { #if defined(TARGET_SDL2) + if (sdl_window == NULL) + return; + SDL_SetWindowTitle(sdl_window, program.window_title); #else SDL_WM_SetCaption(program.window_title, program.window_title);