From 0e6ca79d9dc6171eeea89d86807c9d7be9bdb305 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 18 Sep 2015 11:19:17 +0200 Subject: Give RemoteControllers a global lifetime --- src/DabMod.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/DabMod.cpp') diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 6d67dc4..348f336 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -76,6 +76,10 @@ typedef std::complex complexf; using namespace std; +// We need global lifetime for the RemoteControllers because +// some destructors of long lived objects use it. +RemoteControllers rcs; + volatile sig_atomic_t running = 1; void signalHandler(int signalNb) @@ -164,7 +168,6 @@ int launch_modulator(int argc, char* argv[]) shared_ptr format_converter; shared_ptr output; - RemoteControllers rcs; m.rcs = &rcs; bool run_again = true; -- cgit v1.2.3