Reversed nullptr device check

This commit is contained in:
EricLiu2000
2019-06-25 17:46:59 -04:00
parent 150c7d2b07
commit bb2d7c1265
+1 -1
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';
}