1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1744 fix crash on revo with ubx config

This commit is contained in:
abeck70 2015-02-24 22:40:49 +11:00
parent 1cdc00d285
commit c5275fc89b

View File

@ -399,6 +399,7 @@ void ubx_autoconfig_set(ubx_autoconfig_settings_t config)
if (config.autoconfigEnabled) {
if (!status) {
status = (status_t *)pios_malloc(sizeof(status_t));
PIOS_Assert(status);
memset(status, 0, sizeof(status_t));
status->currentStep = INIT_STEP_DISABLED;
}
@ -406,7 +407,7 @@ void ubx_autoconfig_set(ubx_autoconfig_settings_t config)
status->currentStep = INIT_STEP_START;
enabled = true;
} else {
if (!status) {
if (status) {
status->currentStep = INIT_STEP_DISABLED;
}
}