Fix LiveWindow SetEnabled C++ std::bad_function_call (#2281)

It was missing a null check.
This commit is contained in:
Peter Johnson
2020-01-16 00:34:51 -08:00
committed by GitHub
parent 37202b6f28
commit b1357cace7

View File

@@ -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);
}