mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Reversed nullptr device check
This commit is contained in:
@@ -6,7 +6,7 @@ using namespace icsneo;
|
|||||||
|
|
||||||
APIEvent::APIEvent(Type type, APIEvent::Severity severity, const Device* device) : eventStruct({}) {
|
APIEvent::APIEvent(Type type, APIEvent::Severity severity, const Device* device) : eventStruct({}) {
|
||||||
this->device = device;
|
this->device = device;
|
||||||
if(!device) {
|
if(device) {
|
||||||
serial = device->getSerial();
|
serial = device->getSerial();
|
||||||
eventStruct.serial[serial.copy(eventStruct.serial, sizeof(eventStruct.serial))] = '\0';
|
eventStruct.serial[serial.copy(eventStruct.serial, sizeof(eventStruct.serial))] = '\0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user