mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
Piano: Improve handling of possibly null parameter label
The current implementation could crash in various locations if the label was null.
This commit is contained in:
parent
cf6676beb2
commit
401a21e4f4
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@ ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, DSP:
|
|||
set_step((min_log - max_log) / slider_steps);
|
||||
}
|
||||
set_tooltip(m_parameter.name().to_deprecated_string());
|
||||
m_value_label->set_text(DeprecatedString::formatted("{:.2f}", static_cast<double>(m_parameter)));
|
||||
if (m_value_label != nullptr)
|
||||
m_value_label->set_text(DeprecatedString::formatted("{:.2f}", static_cast<double>(m_parameter)));
|
||||
|
||||
on_change = [this](auto value) {
|
||||
if (m_currently_setting_from_ui)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue