From 89b617910c363dfc50d07f5dffc28989dc26b811 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 15 Dec 2013 18:52:01 +0100 Subject: Fix output cleanup that could lead to segfaults --- src/DabMux.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DabMux.cpp b/src/DabMux.cpp index ca0fb1a..89bb38b 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -1829,8 +1829,10 @@ EXIT: (*subchannel)->operations.clean(&(*subchannel)->data); } for (output = outputs.begin() ; output != outputs.end(); ++output) { - (*output)->output->Close(); - delete ((*output)->output); + if ((*output)->output) { + (*output)->output->Close(); + delete ((*output)->output); + } } for_each(ensemble->components.begin(), ensemble->components.end(), free); -- cgit v1.2.3