summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/windows/platform.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/windows/platform.cpp b/client/windows/platform.cpp
index 0f35a65f..223be1d7 100644
--- a/client/windows/platform.cpp
+++ b/client/windows/platform.cpp
@@ -236,6 +236,7 @@ static void create_message_wind()
{
WNDCLASSEX wclass;
ATOM class_atom;
+ DWORD err;
const LPCWSTR class_name = L"spicec_platform_wclass";
@@ -259,9 +260,9 @@ static void create_message_wind()
if (!(platform_win = CreateWindow(class_name, L"", 0, 0, 0, 0, 0, NULL, NULL, instance, NULL))) {
THROW("create message window failed");
}
-
- if (!(next_clipboard_viewer_win = SetClipboardViewer(platform_win)) && GetLastError()) {
- THROW("set clipboard viewer failed");
+ SetLastError(0);
+ if (!(next_clipboard_viewer_win = SetClipboardViewer(platform_win)) && (err = GetLastError())) {
+ THROW("set clipboard viewer failed %u", err);
}
if (!(clipboard_event = CreateEvent(NULL, FALSE, FALSE, NULL))) {
THROW("create clipboard event failed");