# HG changeset patch # User mosu # Date 1088440981 0 # Node ID 44895a7161c8aead046cacb788dce47a2d69bdda # Parent 0eddf78981ed5048d50edceee012affc2f246b63 Do not dereference NULL if no track could be found for a block. diff -r 0eddf78981ed -r 44895a7161c8 libmpdemux/demux_mkv.c --- a/libmpdemux/demux_mkv.c Mon Jun 28 16:36:50 2004 +0000 +++ b/libmpdemux/demux_mkv.c Mon Jun 28 16:43:01 2004 +0000 @@ -2704,8 +2704,15 @@ clear_subtitles(demuxer, tc, 0); for (i=0; inum_tracks; i++) - if (mkv_d->tracks[i]->tnum == num) + if (mkv_d->tracks[i]->tnum == num) { track = mkv_d->tracks[i]; + break; + } + if (track == NULL) + { + free(lace_size); + return 1; + } if (num == demuxer->audio->id) { ds = demuxer->audio;