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:
parent
7e2e52cab8
commit
41c82583f5
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user