From de4996228fec75d5bde6ea8f1d8dbaec6cfebfa7 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 19 Apr 2013 14:49:23 +0200 Subject: [PATCH] * dvbsubtitle: Fix segfault in destructor --- lib/libdvbsub/dvbsubtitle.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index d3384ccf7..26134b02d 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -200,8 +200,11 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void) cDvbSubtitleConverter::~cDvbSubtitleConverter() { - avcodec_close(avctx); - av_free(avctx); + if (avctx) { + avcodec_close(avctx); + av_free(avctx); + avctx = NULL; + } delete bitmaps; }