Skip to content

Commit

Permalink
[avnd] Handle case where the correct port type cannot be generated
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jun 13, 2022
1 parent 99569a7 commit a09e955
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/score-plugin-avnd/Crousti/Executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ struct ApplyEngineControlChangeToUI
template <std::size_t N, std::size_t NField>
void operator()(auto& field, avnd::predicate_index<N>, avnd::field_index<NField>)
{
auto inlet = safe_cast<Process::ControlInlet*>(modelPort<Node>(element.inlets(), NField));
inlet->setExecutionValue(oscr::to_ossia_value(field, field.value));
if(auto p = modelPort<Node>(element.inlets(), NField))
if(auto inlet = dynamic_cast<Process::ControlInlet*>(p))
inlet->setExecutionValue(oscr::to_ossia_value(field, field.value));
}
};

Expand Down

0 comments on commit a09e955

Please sign in to comment.