Skip to content

Commit 34eefb4

Browse files
authored
Merge pull request ARMmbed#10858 from LMESTM/fix_cellular_properties
Check Cellular Properties have been set
2 parents a176bcb + 3286472 commit 34eefb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

features/cellular/framework/AT/AT_CellularBase.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ device_err_t AT_CellularBase::get_device_error() const
3434
return _at.get_last_device_error();
3535
}
3636

37-
const intptr_t *AT_CellularBase::_property_array;
37+
const intptr_t *AT_CellularBase::_property_array = NULL;
3838

3939
void AT_CellularBase::set_cellular_properties(const intptr_t *property_array)
4040
{
@@ -48,5 +48,9 @@ void AT_CellularBase::set_cellular_properties(const intptr_t *property_array)
4848

4949
intptr_t AT_CellularBase::get_property(CellularProperty key)
5050
{
51-
return _property_array[key];
51+
if (_property_array) {
52+
return _property_array[key];
53+
} else {
54+
return NULL;
55+
}
5256
}

0 commit comments

Comments
 (0)