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/libui/windows | |
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/libui/windows')
-rw-r--r-- | src/libui_sdl/libui/windows/text.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libui_sdl/libui/windows/text.cpp b/src/libui_sdl/libui/windows/text.cpp index af79fb8..a52af10 100644 --- a/src/libui_sdl/libui/windows/text.cpp +++ b/src/libui_sdl/libui/windows/text.cpp @@ -29,8 +29,7 @@ WCHAR *windowText(HWND hwnd) void setWindowText(HWND hwnd, WCHAR *wtext) { - if (SetWindowTextW(hwnd, wtext) == 0) - logLastError(L"error setting window text"); + SetWindowTextW(hwnd, wtext); } void uiFreeText(char *text) |