You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lines 369-373 of nfd_win.cpp (using devel branch):
if ( !SUCCEEDED(result))
{
NFDi_SetError("Could not initialize COM.");
goto end;
}
In the existing implementation, the above code is executed when CoInitializeEx() fails. end is where CoUninitialize() is called. Calling CoUninitialize() if CoInitializeEx() fails is wrong, according to the MSDN documentation:
To close the COM library gracefully on a thread, each successful call to CoInitialize or CoInitializeEx, including any call that returns S_FALSE, must be balanced by a corresponding call to CoUninitialize.
So we shouldn't be calling CoUninitialize() if it CoInitializeEx() does not succeed.
The text was updated successfully, but these errors were encountered:
Lines 369-373 of nfd_win.cpp (using devel branch):
In the existing implementation, the above code is executed when CoInitializeEx() fails.
end
is where CoUninitialize() is called. Calling CoUninitialize() if CoInitializeEx() fails is wrong, according to the MSDN documentation:So we shouldn't be calling CoUninitialize() if it CoInitializeEx() does not succeed.
The text was updated successfully, but these errors were encountered: