From 2a7bef47facf145afa858c5cd70be88ca895119e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 5 May 2025 21:51:23 -0600 Subject: [PATCH] return immediately in a non-void Signal if there are no handlers This allows r.begin(() to not refer to undefined memory --- libs/pbd/pbd/signals.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index 5f704b2aa0..dc6d69da67 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -503,6 +503,10 @@ SignalWithCombiner::operator() (A... a) return; } else { + if (s.empty()) { + return typename Combiner::result_type (); + } + std::vector > r; slot_function_type functor;