Merge pull request #10858 from LMESTM/fix_cellular_properties

Check Cellular Properties have been set
pull/10896/head
Martin Kojtal 2019-06-25 10:58:23 +01:00 committed by GitHub
commit 34eefb49fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,7 @@ device_err_t AT_CellularBase::get_device_error() const
return _at.get_last_device_error(); return _at.get_last_device_error();
} }
const intptr_t *AT_CellularBase::_property_array; const intptr_t *AT_CellularBase::_property_array = NULL;
void AT_CellularBase::set_cellular_properties(const intptr_t *property_array) void AT_CellularBase::set_cellular_properties(const intptr_t *property_array)
{ {
@ -48,5 +48,9 @@ void AT_CellularBase::set_cellular_properties(const intptr_t *property_array)
intptr_t AT_CellularBase::get_property(CellularProperty key) intptr_t AT_CellularBase::get_property(CellularProperty key)
{ {
return _property_array[key]; if (_property_array) {
return _property_array[key];
} else {
return NULL;
}
} }