Skip to content

Commit

Permalink
Fix LiveWindow SetEnabled C++ std::bad_function_call (#2281)
Browse files Browse the repository at this point in the history
It was missing a null check.
  • Loading branch information
PeterJohnson authored Jan 16, 2020
1 parent 37202b6 commit b1357ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wpilibc/src/main/native/cpp/livewindow/LiveWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ void LiveWindow::SetEnabled(bool enabled) {
// Force table generation now to make sure everything is defined
UpdateValuesUnsafe();
if (enabled) {
this->enabled();
if (this->enabled) this->enabled();
} else {
m_impl->registry.ForeachLiveWindow(m_impl->dataHandle, [&](auto& cbdata) {
cbdata.builder.StopLiveWindowMode();
});
this->disabled();
if (this->disabled) this->disabled();
}
m_impl->enabledEntry.SetBoolean(enabled);
}
Expand Down

0 comments on commit b1357ca

Please sign in to comment.