From e4e8d775c00b8a1c33d4830422f1ccabe39ab126 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Sun, 17 Dec 2017 02:11:28 +0100 Subject: libui/windows: don't explode if setWindowText() fails. fixes random crash when closing window. also add extra safety, can't hurt. --- src/libui_sdl/libui/windows/text.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libui_sdl/libui') 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) -- cgit v1.2.3