diff options
-rw-r--r-- | libavcodec/movtextdec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index 15dd434..83b0231 100644 --- a/libavcodec/movtextdec.c +++ b/libavcodec/movtextdec.c @@ -93,9 +93,11 @@ static void mov_text_cleanup(MovTextContext *m) static void mov_text_cleanup_ftab(MovTextContext *m) { int i; - for(i = 0; i < m->count_f; i++) { - av_freep(&m->ftab[i]->font); - av_freep(&m->ftab[i]); + if (m->ftab) { + for(i = 0; i < m->count_f; i++) { + av_freep(&m->ftab[i]->font); + av_freep(&m->ftab[i]); + } } av_freep(&m->ftab); } |