Merge "[PackageUsage] fix NPE" into tm-dev
This commit is contained in:
@@ -66,7 +66,8 @@ class PackageUsage extends AbstractStatsBase<Map<String, PackageSetting>> {
|
|||||||
out.write(sb.toString().getBytes(StandardCharsets.US_ASCII));
|
out.write(sb.toString().getBytes(StandardCharsets.US_ASCII));
|
||||||
|
|
||||||
for (PackageSetting pkgSetting : pkgSettings.values()) {
|
for (PackageSetting pkgSetting : pkgSettings.values()) {
|
||||||
if (pkgSetting.getPkgState().getLatestPackageUseTimeInMills() == 0L) {
|
if (pkgSetting == null || pkgSetting.getPkgState() == null
|
||||||
|
|| pkgSetting.getPkgState().getLatestPackageUseTimeInMills() == 0L) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user