return immediately in a non-void Signal if there are no handlers

This allows r.begin(() to not refer to undefined memory
This commit is contained in:
Paul Davis 2025-05-05 21:51:23 -06:00
parent 9deee4df7c
commit 2a7bef47fa

View file

@ -503,6 +503,10 @@ SignalWithCombiner<Combiner, R(A...)>::operator() (A... a)
return;
} else {
if (s.empty()) {
return typename Combiner::result_type ();
}
std::vector<R,PBD::StackAllocator<R,nslots> > r;
slot_function_type functor;