[FL-2254] IR: fix hardfault, correct remote loading (#999)

* Bugfix: remove freeing of uninitialized object (IrdaAppSignal).
Therefore rubbish in memory sometimes caused HardFault.
* Fix: slow FFF makes IR-remotes loading take much time,
so we can glimpse previous scene's view while remote is parsing.
Reproducing: remove remote, fast press back (while popup is playing)
and select new remote - previous popup view is displayed.
This commit is contained in:
Albert Kharisov
2022-02-16 20:09:43 +04:00
committed by GitHub
parent 97c9a2229f
commit 17d6b9f612
4 changed files with 16 additions and 10 deletions

View File

@@ -110,10 +110,11 @@ std::string IrdaAppRemoteManager::get_button_name(uint32_t index) {
}
std::string IrdaAppRemoteManager::get_remote_name() {
return remote ? remote->name : std::string();
return remote.get() ? remote->name : std::string();
}
int IrdaAppRemoteManager::find_remote_name(const std::vector<std::string>& strings) {
furi_assert(remote.get() != nullptr);
int i = 0;
for(const auto& str : strings) {
if(!str.compare(remote->name)) {