Avoid reporting false error for common controls initialization
This commit is contained in:
parent
7138276ccf
commit
1aca682ad9
|
@ -105,8 +105,12 @@ const char *uiInit(uiInitOptions *o)
|
||||||
ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX));
|
ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX));
|
||||||
icc.dwSize = sizeof (INITCOMMONCONTROLSEX);
|
icc.dwSize = sizeof (INITCOMMONCONTROLSEX);
|
||||||
icc.dwICC = wantedICCClasses;
|
icc.dwICC = wantedICCClasses;
|
||||||
if (InitCommonControlsEx(&icc) == 0)
|
if (InitCommonControlsEx(&icc) == 0) {
|
||||||
return ieLastErr("initializing Common Controls");
|
DWORD last_err = GetLastError();
|
||||||
|
if (last_err != 0) {
|
||||||
|
return initerr("=" "initializing Common Controls", L"GetLastError() ==", last_err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hr = CoInitialize(NULL);
|
hr = CoInitialize(NULL);
|
||||||
if (hr != S_OK && hr != S_FALSE)
|
if (hr != S_OK && hr != S_FALSE)
|
||||||
|
|
Loading…
Reference in New Issue