aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index d2403c1..9fbd303 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -201,6 +201,7 @@ char * strndup(const char* str, size_t maxlen){
string NitrokeyManager::get_serial_number() {
+ if (device == nullptr) { return ""; };
switch (device->get_device_model()) {
case DeviceModel::PRO: {
auto response = GetStatus::CommandTransaction::run(device);