Skip to content

Commit

Permalink
check for null in resultPassesUuidFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
alerighi committed Jan 20, 2025
1 parent 2f079d8 commit 071aadb
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ private boolean resultPassesUuidFilter(ScanResult result) {
return false;
}

for (ParcelUuid uuid : record.getServiceUuids()) {
List<ParcelUuid> uuids = record.getServiceUuids();
if (uuids == null) {
return false;
}
for (ParcelUuid uuid : uuids) {
if (uuid == null) {
continue;
}
for (ParcelUuid allowedUuid : filter) {
if (uuid.equals(allowedUuid)) {
return true;
Expand Down

0 comments on commit 071aadb

Please sign in to comment.