Skip to content

Commit

Permalink
emscripten: Fix crash in SDL_SetWindowTitle().
Browse files Browse the repository at this point in the history
This patch came from emscripten-ports, thanks!

Fixes Bugzilla #5133.
  • Loading branch information
icculus committed May 13, 2020
1 parent 1a291ab commit daf360e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/emscripten/SDL_emscriptenvideo.c
Expand Up @@ -366,8 +366,8 @@ Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * di
static void
Emscripten_SetWindowTitle(_THIS, SDL_Window * window) {
EM_ASM_INT({
if (typeof Module['setWindowTitle'] !== 'undefined') {
Module['setWindowTitle'](UTF8ToString($0));
if (typeof setWindowTitle !== 'undefined') {
setWindowTitle(UTF8ToString($0));
}
return 0;
}, window->title);
Expand Down

0 comments on commit daf360e

Please sign in to comment.