aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/windows
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-12-17 02:11:28 +0100
committerStapleButter <thetotalworm@gmail.com>2017-12-17 02:11:28 +0100
commite4e8d775c00b8a1c33d4830422f1ccabe39ab126 (patch)
treed2dc19206b3ff908c496ccf8bf5617e53a02b458 /src/libui_sdl/libui/windows
parent2e82a4f26ac99a1a93afdcb6bbfc4095d0933cc6 (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.cpp3
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)