diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-12-17 02:11:28 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-12-17 02:11:28 +0100 |
commit | e4e8d775c00b8a1c33d4830422f1ccabe39ab126 (patch) | |
tree | d2dc19206b3ff908c496ccf8bf5617e53a02b458 /src/libui_sdl/main.cpp | |
parent | 2e82a4f26ac99a1a93afdcb6bbfc4095d0933cc6 (diff) |
libui/windows: don't explode if setWindowText() fails. fixes random crash when closing window.
also add extra safety, can't hurt.
Diffstat (limited to 'src/libui_sdl/main.cpp')
-rw-r--r-- | src/libui_sdl/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 61742b5..814d92c 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -755,6 +755,12 @@ void TryLoadROM(char* file, int prevstatus) int OnCloseWindow(uiWindow* window, void* blarg) { + if (RunningSomething) + { + EmuRunning = 2; + while (EmuStatus != 2); + } + uiQuit(); return 1; } |