summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/odr-audioenc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index 5f95538..6347c90 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -1210,7 +1210,9 @@ AudioEnc::~AudioEnc()
file_output.reset();
zmq_output.reset();
- free_rs_char(rs_handler);
+ if (rs_handler != nullptr) {
+ free_rs_char(rs_handler);
+ }
if (selected_encoder == encoder_selection_t::fdk_dabplus) {
aacEncClose(&encoder);