aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/BaseObjectManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/database/BaseObjectManager.java')
-rw-r--r--src/main/java/org/traccar/database/BaseObjectManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/database/BaseObjectManager.java b/src/main/java/org/traccar/database/BaseObjectManager.java
index e274e5aba..d0024c005 100644
--- a/src/main/java/org/traccar/database/BaseObjectManager.java
+++ b/src/main/java/org/traccar/database/BaseObjectManager.java
@@ -158,7 +158,10 @@ public class BaseObjectManager<T extends BaseModel> {
public final Collection<T> getItems(Set<Long> itemIds) {
Collection<T> result = new LinkedList<>();
for (long itemId : itemIds) {
- result.add(getById(itemId));
+ T item = getById(itemId);
+ if (item != null) {
+ result.add(item);
+ }
}
return result;
}