aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BaseEventHandler.java')
-rw-r--r--src/org/traccar/BaseEventHandler.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/BaseEventHandler.java b/src/org/traccar/BaseEventHandler.java
index 1ae9d2c6d..82e78c6b3 100644
--- a/src/org/traccar/BaseEventHandler.java
+++ b/src/org/traccar/BaseEventHandler.java
@@ -26,10 +26,8 @@ public abstract class BaseEventHandler extends BaseDataHandler {
protected Position handlePosition(Position position) {
Collection<Event> events = analyzePosition(position);
- if (events != null) {
- for (Event event : events) {
- Context.getNotificationManager().updateEvent(event, position);
- }
+ if (events != null && Context.getNotificationManager() != null) {
+ Context.getNotificationManager().updateEvents(events, position);
}
return position;
}