From 6635ea75ee0c4243d47636f8c4f7b6d7dec6302e Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 22 Oct 2019 21:12:07 -0700 Subject: [PATCH] Fix NPE in SendableRegistry.foreachLiveWindow() (#1974) --- .../edu/wpi/first/wpilibj/smartdashboard/SendableRegistry.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableRegistry.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableRegistry.java index c19747ee2a..79b9b2a9f6 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableRegistry.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableRegistry.java @@ -468,6 +468,9 @@ public class SendableRegistry { Consumer callback) { CallbackData cbdata = new CallbackData(); for (Component comp : components.values()) { + if (comp.m_sendable == null) { + continue; + } cbdata.sendable = comp.m_sendable.get(); if (cbdata.sendable != null && comp.m_liveWindow) { cbdata.name = comp.m_name;