mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Fix moved pneumatics objects not destructing properly (#4068)
This commit is contained in:
@@ -39,7 +39,9 @@ Solenoid::Solenoid(PneumaticsModuleType moduleType, int channel)
|
||||
channel} {}
|
||||
|
||||
Solenoid::~Solenoid() {
|
||||
m_module->UnreserveSolenoids(m_mask);
|
||||
if (m_module) {
|
||||
m_module->UnreserveSolenoids(m_mask);
|
||||
}
|
||||
}
|
||||
|
||||
void Solenoid::Set(bool on) {
|
||||
|
||||
Reference in New Issue
Block a user