Skip to content

Commit

Permalink
Add null check code
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorkim authored and reconbot committed Jan 15, 2018
1 parent bc46149 commit 602793d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 602793d

Please sign in to comment.