dvbsuboverlay: Make the new dvb_subtitles_free() accept NULL

Don't crash if dvb_subtitles_free(NULL) gets passed, like most other
*_free functions are happy with.
This commit is contained in:
Mart Raudsepp 2010-12-01 05:49:22 +02:00 committed by Edward Hervey
parent 7e2e52cab8
commit 41c82583f5

View file

@ -1371,6 +1371,9 @@ dvb_subtitles_free (DVBSubtitles * sub)
int i;
DVBSubtitleRect *rect;
if (sub == NULL)
return;
/* Now free up all the temporary memory we allocated */
for (i = 0; i < sub->num_rects; ++i) {
rect = sub->rects[i];