logger: fix hardfault for invalid SDLOG_PROFILE setting

If some bits are set but no topic was added, _subscriptions was null but
later accessed.

During normal use this only happens when switching between different
firmware versions with different SDLOG_PROFILE definition (with custom
config).
This commit is contained in:
Beat Küng 2020-06-29 10:20:07 +02:00 committed by Daniel Agar
parent 1ea416f6de
commit d22bbde7c5

View File

@ -373,7 +373,7 @@ bool LoggedTopics::initialize_logged_topics(SDLogProfileMask profile)
initialize_configured_topics(profile);
}
return true;
return _subscriptions.count > 0;
}
void LoggedTopics::initialize_configured_topics(SDLogProfileMask profile)