mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-22 15:10:23 +02:00
Bug 1608: Don't crash editing parameters of LV2 effect in a Chain
This commit is contained in:
parent
40a4f89243
commit
560a1e88ed
@ -1868,7 +1868,8 @@ bool LV2Effect::TransferDataToWindow()
|
||||
if (ctrl.mToggle)
|
||||
{
|
||||
wxCheckBox *c = wxDynamicCast(mParent->FindWindow(ID_Toggles + p), wxCheckBox);
|
||||
c->SetValue(ctrl.mVal > 0);
|
||||
if (c)
|
||||
c->SetValue(ctrl.mVal > 0);
|
||||
}
|
||||
else if (ctrl.mEnumeration) // Check before integer
|
||||
{
|
||||
@ -1887,17 +1888,19 @@ bool LV2Effect::TransferDataToWindow()
|
||||
}
|
||||
|
||||
wxChoice *c = wxDynamicCast(mParent->FindWindow(ID_Choices + p), wxChoice);
|
||||
c->SetSelection(s);
|
||||
if (c)
|
||||
c->SetSelection(s);
|
||||
}
|
||||
else if (ctrl.mInput)
|
||||
{
|
||||
ctrl.mTmp = ctrl.mVal * (ctrl.mSampleRate ? mSampleRate : 1.0);
|
||||
SetSlider(mSliders[p], ctrl);
|
||||
if (mSliders && mSliders[p])
|
||||
SetSlider(mSliders[p], ctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mParent->TransferDataToWindow())
|
||||
if (mParent && !mParent->TransferDataToWindow())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user