- fix crash with pkcs11 module and token disconnect

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1740 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2004-01-20 11:21:40 +00:00
parent 2b4b08550b
commit 9d49aa0769
1 changed files with 4 additions and 0 deletions

View File

@ -399,6 +399,10 @@ openct_reader_unlock(struct sc_reader *reader,
SC_FUNC_CALLED(reader->ctx, 1);
/* Not connected */
if (data->h == NULL)
return 0;
rc = ct_card_unlock(data->h, slot->id, slot_data->excl_lock);
/* We couldn't care less */