Add null check code

This commit is contained in:
jykim 2018-01-09 11:30:35 +09:00 • committed by Francis Gulotta
parent bc46149b27
commit 602793dcd0

View file

@ -281,7 +281,7 @@ void EIO_List(uv_work_t* req) {
}
stDeviceListItem* devices = GetSerialDevices();
if (*(devices->length) > 0) {
if (devices != NULL && *(devices->length) > 0) {
stDeviceListItem* next = devices;
for (int i = 0, len = *(devices->length); i < len; i++) {