mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Fix a nullptr deref in ref VHAL." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
c19703fe09
@@ -494,7 +494,11 @@ void DefaultVehicleHal::onContinuousPropertyTimer(const std::vector<int32_t>& pr
|
||||
}
|
||||
|
||||
for (int areaId : areaIds) {
|
||||
auto v = pool.obtain(*mPropStore->refreshTimestamp(property, areaId));
|
||||
auto refreshedProp = mPropStore->refreshTimestamp(property, areaId);
|
||||
VehiclePropValuePtr v = nullptr;
|
||||
if (refreshedProp != nullptr) {
|
||||
v = pool.obtain(*refreshedProp);
|
||||
}
|
||||
if (v.get()) {
|
||||
events.push_back(std::move(v));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user