Mercurial > mplayer.hg
comparison gui/dialog/menu.c @ 36781:e5c790cab2e8
Check demuxer to avoid NULL pointer usage.
author | ib |
---|---|
date | Mon, 17 Feb 2014 22:34:27 +0000 |
parents | 5ea757ca6270 |
children | 1236a692d0c6 |
comparison
equal
deleted
inserted
replaced
36780:a5550a57a6cb | 36781:e5c790cab2e8 |
---|---|
742 av_strlcpy( lng, lang, sizeof(lng) ); | 742 av_strlcpy( lng, lang, sizeof(lng) ); |
743 ret = 0; | 743 ret = 0; |
744 } | 744 } |
745 } | 745 } |
746 /* embedded (demuxer) */ | 746 /* embedded (demuxer) */ |
747 else if ( i >= subs0 + subs1 ) | 747 else if ( ( i >= subs0 + subs1 ) && demuxer ) |
748 { | 748 { |
749 for ( j=0;j < MAX_S_STREAMS;j++ ) | 749 for ( j=0;j < MAX_S_STREAMS;j++ ) |
750 { | 750 { |
751 if ( demuxer->s_streams[j] ) ret++; | 751 if ( demuxer->s_streams[j] ) ret++; |
752 if ( ret == i - subs0 - subs1 ) | 752 if ( ret == i - subs0 - subs1 ) |