Skip to content

Commit

Permalink
Merge pull request #4483 from daschuer/effects_refactoring_lp1948606
Browse files Browse the repository at this point in the history
Effects refactoring: fix segfault
  • Loading branch information
Be-ing committed Oct 25, 2021
2 parents 30bdf83 + 351d9c8 commit 8f1925a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/effects/chains/quickeffectchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ EffectChainPresetPointer QuickEffectChain::presetAtIndex(int index) const {

void QuickEffectChain::loadChainPreset(EffectChainPresetPointer pPreset) {
EffectChain::loadChainPreset(pPreset);
setSuperParameter(pPreset->superKnob(), true);
if (pPreset) {
setSuperParameter(pPreset->superKnob(), true);
}
}

int QuickEffectChain::numPresets() const {
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effectchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ const QString& EffectChain::presetName() const {
}

void EffectChain::loadChainPreset(EffectChainPresetPointer pPreset) {
slotControlClear(1);
VERIFY_OR_DEBUG_ASSERT(pPreset) {
return;
}
slotControlClear(1);

int effectSlotIndex = 0;
for (const auto& pEffectPreset : pPreset->effectPresets()) {
Expand Down

0 comments on commit 8f1925a

Please sign in to comment.