diff --git a/client/QCNG.cpp b/client/QCNG.cpp index f9daafa4d..54813db46 100644 --- a/client/QCNG.cpp +++ b/client/QCNG.cpp @@ -209,7 +209,10 @@ QList QCNG::tokens() const continue; if(reader.isEmpty()) - reader = QString::fromUtf16((const char16_t*)prop(key, NCRYPT_READER_PROPERTY).data()); + { + if(QByteArray tmp = prop(key, NCRYPT_READER_PROPERTY); !tmp.isEmpty()) + reader = QString::fromUtf16((const char16_t*)tmp.data()); + } QString guid = prop(h, NCRYPT_SMARTCARD_GUID_PROPERTY).trimmed(); TokenData &t = result.emplaceBack(); t.setReader(reader);