Skip to content

Commit

Permalink
skip listener when current transformation is null
Browse files Browse the repository at this point in the history
  • Loading branch information
JohT committed May 8, 2022
1 parent f7d2c63 commit f092d80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dsp/transformations/TransformationFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ auto TransformationFactory::createTransformation(

void TransformationFactory::registerForTransformationResults(TransformationListener *value) {
listenerToHandOverToEveryNewTransformation = value;
currentTransformation->setTransformResultListener(listenerToHandOverToEveryNewTransformation);
if (currentTransformation != nullptr) {
currentTransformation->setTransformResultListener(listenerToHandOverToEveryNewTransformation);
}
}

void TransformationFactory::deleteTransformation() {
Expand Down

0 comments on commit f092d80

Please sign in to comment.