kopia lustrzana https://github.com/stlink-org/stlink
Merge pull request #1307 from IVOES/fix-inconsistent-null-check
Added null check for return value of stlink_chipid_get_params().pull/1309/head^2
commit
78b2893e5d
|
@ -591,7 +591,8 @@ int main(int argc, char **argv) {
|
|||
if (!(stlink->chip_flags & CHIP_F_HAS_SWO_TRACING)) {
|
||||
const struct stlink_chipid_params *params =
|
||||
stlink_chipid_get_params(stlink->chip_id);
|
||||
ELOG("We do not support SWO output for device '%s'\n", params->dev_type);
|
||||
ELOG("We do not support SWO output for device '%s'\n",
|
||||
params ? params->dev_type : "");
|
||||
if (!settings.force)
|
||||
return APP_RESULT_STLINK_UNSUPPORTED_DEVICE;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue