13
0

Session::add_source cannot fail

This commit is contained in:
Robin Gareus 2023-05-31 01:15:28 +02:00
parent d7f631757a
commit f07361b34e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -4616,6 +4616,10 @@ Session::add_source (std::shared_ptr<Source> source)
source->DropReferences.connect_same_thread (*this, boost::bind (&Session::remove_source, this, std::weak_ptr<Source> (source), false));
SourceAdded (std::weak_ptr<Source> (source)); /* EMIT SIGNAL */
} else {
/* If this happens there is a duplicate PBD::ID */
assert (0);
fatal << string_compose (_("programming error: %1"), "Failed to add source to source-list") << endmsg;
}
}