Skip to content

Commit

Permalink
[core] be more lenient with disappearing ports
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Nov 15, 2024
1 parent b0c8ca8 commit d9c5c62
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ void SetControlValue::undo(const score::DocumentContext& ctx) const

void SetControlValue::redo(const score::DocumentContext& ctx) const
{
m_path.find(ctx).setValue(m_new);
if(auto obj = m_path.try_find(ctx))
{
obj->setValue(m_new);
}
else
{
qDebug() << "Could not find: " << m_path.unsafePath().toString();
}
}

void SetControlValue::update(const ControlInlet& obj, ossia::value newval)
Expand Down

0 comments on commit d9c5c62

Please sign in to comment.