Reversed nullptr device check

checksum-failure-logging
EricLiu2000 2019-06-25 17:46:59 -04:00
parent 150c7d2b07
commit bb2d7c1265
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ using namespace icsneo;
APIEvent::APIEvent(Type type, APIEvent::Severity severity, const Device* device) : eventStruct({}) {
this->device = device;
if(!device) {
if(device) {
serial = device->getSerial();
eventStruct.serial[serial.copy(eventStruct.serial, sizeof(eventStruct.serial))] = '\0';
}