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");
|
SetStrProp("ctl.start", "logd-reinit");
|
||||||
}
|
}
|
||||||
const auto *pi = __system_property_find(kLogdTagProp.data());
|
const auto *pi = __system_property_find(kLogdTagProp.data());
|
||||||
uint32_t serial;
|
uint32_t serial = 0;
|
||||||
__system_property_read_callback(pi, [](auto *c, auto, auto, auto s) {
|
if (pi != nullptr) {
|
||||||
*reinterpret_cast<uint32_t *>(c) = s;
|
__system_property_read_callback(pi, [](auto *c, auto, auto, auto s) {
|
||||||
}, &serial);
|
*reinterpret_cast<uint32_t *>(c) = s;
|
||||||
|
}, &serial);
|
||||||
|
}
|
||||||
if (!__system_property_wait(pi, serial, &serial, nullptr)) break;
|
if (!__system_property_wait(pi, serial, &serial, nullptr)) break;
|
||||||
Log("\nResetting log settings\n");
|
if (pi != nullptr) Log("\nResetting log settings\n");
|
||||||
}
|
}
|
||||||
}).detach();
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue