From 9001cba02cc9eb8039e7faea0309dab2225cb8ba Mon Sep 17 00:00:00 2001 From: janwas Date: Sat, 1 Dec 2012 02:34:19 +0000 Subject: [PATCH] fix: remove unnecessary failure check concerning window class atom. fixes #1729 This was SVN commit r12906. --- source/lib/sysdep/os/win/wsdl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/lib/sysdep/os/win/wsdl.cpp b/source/lib/sysdep/os/win/wsdl.cpp index 3a0a6e89a9..1f843f5aed 100644 --- a/source/lib/sysdep/os/win/wsdl.cpp +++ b/source/lib/sysdep/os/win/wsdl.cpp @@ -247,11 +247,9 @@ static HWND wnd_CreateWindow(int w, int h) wc.lpszClassName = L"WSDL{55752F43-0241-492C-8648-C7243397FCE4}"; wc.hInstance = hInst; ATOM class_atom = RegisterClassW(&wc); - if(!class_atom) - { - DEBUG_WARN_ERR(ERR::LOGIC); // RegisterClassW failed - return 0; - } + // ignore failure, which is probably caused by not unregistering the class + // (does not happen automatically when called from a DLL). just re-use + // the existing class, which is safe because our class name is unique. const DWORD windowStyle = wnd_ChooseWindowStyle(fullscreen); wnd_UpdateWindowDimensions(windowStyle, w, h);