dvbsubtitle: Fix segfault in destructor

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1fb105b361
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-04-19 (Fri, 19 Apr 2013)

Origin message was:
------------------
* dvbsubtitle: Fix segfault in destructor

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2013-04-19 14:49:23 +02:00
parent c8beddcb80
commit b7e2c242d6

View File

@@ -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;
}