Return out of ecrt_slave_config_pdos() when pdo_infos == NULL

This commit is contained in:
Richard Hacker 2008-06-24 10:55:40 +00:00
parent 5223684939
commit d6c87aa3b8
1 changed files with 3 additions and 0 deletions

View File

@ -434,6 +434,9 @@ int ecrt_slave_config_pdos(ec_slave_config_t *sc, unsigned int n_infos,
unsigned int cleared[] = {0, 0};
const ec_pdo_entry_info_t *ei;
if (!pdo_infos)
return 0;
for (i = 0; i < n_infos; i++) {
pi = &pdo_infos[i];