diff --git a/channels/smartcard/client/smartcard_main.c b/channels/smartcard/client/smartcard_main.c index 04dcb90ab..134c021f8 100644 --- a/channels/smartcard/client/smartcard_main.c +++ b/channels/smartcard/client/smartcard_main.c @@ -811,7 +811,9 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) else smartcard = sSmartcard; - LinkedList_AddLast(smartcard->names, pEntryPoints->device->Name); + if (pEntryPoints->device->Name) + LinkedList_AddLast(smartcard->names, pEntryPoints->device->Name); + sSmartcard = smartcard; return CHANNEL_RC_OK; fail: