Fix crash when propinfo is null (#1544)
This commit is contained in:
parent
8ddbe37d35
commit
efe6ed1288
|
|
@ -268,12 +268,14 @@ void Logcat::EnsureLogWatchDog() {
|
|||
SetStrProp("ctl.start", "logd-reinit");
|
||||
}
|
||||
const auto *pi = __system_property_find(kLogdTagProp.data());
|
||||
uint32_t serial;
|
||||
uint32_t serial = 0;
|
||||
if (pi != nullptr) {
|
||||
__system_property_read_callback(pi, [](auto *c, auto, auto, auto s) {
|
||||
*reinterpret_cast<uint32_t *>(c) = s;
|
||||
}, &serial);
|
||||
}
|
||||
if (!__system_property_wait(pi, serial, &serial, nullptr)) break;
|
||||
Log("\nResetting log settings\n");
|
||||
if (pi != nullptr) Log("\nResetting log settings\n");
|
||||
}
|
||||
}).detach();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue