trivial: Make fu_dell_detect_dock() slightly more NULL-deref safe

This commit is contained in:
Richard Hughes 2017-07-19 09:14:56 +01:00
parent 11ca8122c3
commit 061ad8c5e8

View File

@ -159,9 +159,10 @@ fu_dell_detect_dock (FuDellSmiObj *smi_obj, guint32 *location)
g_debug ("no dock plugged in");
return FALSE;
}
*location = count_out->location;
g_debug ("Dock count %u, location %u.",
count_out->count, *location);
count_out->count, count_out->location);
if (location != NULL)
*location = count_out->location;
return TRUE;
}