diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 861e6662c6..765d5542b9 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -306,8 +306,8 @@ IO::add_port (string destination, void* src, DataType type) ChanCount after = before; after.set (type, after.get (type) + 1); - bool const r = PortCountChanging (after); /* EMIT SIGNAL */ - if (r) { + boost::optional const r = PortCountChanging (after); /* EMIT SIGNAL */ + if (r.value_or (false)) { return -1; }