diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-15 18:52:01 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-15 18:52:01 +0100 |
commit | 89b617910c363dfc50d07f5dffc28989dc26b811 (patch) | |
tree | e1057ae4f5e5cc4adf281183e082779949db9bcd /src/DabMux.cpp | |
parent | f172d049863a38f33e8b15a3e47d4904b2c81323 (diff) | |
download | dabmux-89b617910c363dfc50d07f5dffc28989dc26b811.tar.gz dabmux-89b617910c363dfc50d07f5dffc28989dc26b811.tar.bz2 dabmux-89b617910c363dfc50d07f5dffc28989dc26b811.zip |
Fix output cleanup that could lead to segfaults
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r-- | src/DabMux.cpp | 6 |
1 files 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); |