Fixing condition on SCardIsValidContext to be true when context is valid

This commit is contained in:
Rostislav Kondratenko 2015-07-17 18:13:02 +03:00
parent f2863fabf5
commit 7248ea98d0

View File

@ -150,7 +150,7 @@ static void smartcard_release_all_contexts(SMARTCARD_DEVICE* smartcard) {
hContext = pContext->hContext;
if (SCardIsValidContext(hContext))
if (SCardIsValidContext(hContext) == SCARD_S_SUCCESS)
{
SCardCancel(hContext);
}
@ -177,7 +177,7 @@ static void smartcard_release_all_contexts(SMARTCARD_DEVICE* smartcard) {
hContext = pContext->hContext;
if (SCardIsValidContext(hContext))
if (SCardIsValidContext(hContext) == SCARD_S_SUCCESS)
{
SCardReleaseContext(hContext);
}