mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fix LiveWindow attempting to start listeners on uninitialized sendables (#1463)
Additionally adds a defensive check in SendableBuilderImpl to avoid the NPE.
This commit is contained in:
committed by
Peter Johnson
parent
3d546428ab
commit
97ba195b88
@@ -33,12 +33,12 @@ void SendableBuilderImpl::UpdateTable() {
|
||||
|
||||
void SendableBuilderImpl::StartListeners() {
|
||||
for (auto& property : m_properties) property.StartListener();
|
||||
m_controllableEntry.SetBoolean(true);
|
||||
if (m_controllableEntry) m_controllableEntry.SetBoolean(true);
|
||||
}
|
||||
|
||||
void SendableBuilderImpl::StopListeners() {
|
||||
for (auto& property : m_properties) property.StopListener();
|
||||
m_controllableEntry.SetBoolean(false);
|
||||
if (m_controllableEntry) m_controllableEntry.SetBoolean(false);
|
||||
}
|
||||
|
||||
void SendableBuilderImpl::StartLiveWindowMode() {
|
||||
|
||||
Reference in New Issue
Block a user