mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 08:15:17 +03:00
[Horus] Malloc check added
This commit is contained in:
parent
2f0492cec5
commit
cdb3f48da7
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ ZoneOption * createOptionsArray(int reference)
|
|||
}
|
||||
|
||||
ZoneOption * options = (ZoneOption *)malloc(sizeof(ZoneOption) * (count+1));
|
||||
if (!options) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lua_rawgeti(lsWidgets, LUA_REGISTRYINDEX, reference);
|
||||
ZoneOption * option = options;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue