# HG changeset patch # User al # Date 1383944800 0 # Node ID c918845d0d9a3d2763ed61ffc7a1ef3b140d1bce # Parent 3dfe2b0db098c2e148de7c4582e72f0db69710b4 mplayer: Fix a crash seeking with -chapter and -ass When seeking to chapter on startup the mpctx->d_sub member is not yet initialized. Do not access it in that case. The commit r31293 that introduced that code explains that it is for handling backward seeking correctly. So it should not be needed on startup forward seek situation. diff -r 3dfe2b0db098 -r c918845d0d9a mplayer.c --- a/mplayer.c Fri Nov 08 16:59:55 2013 +0000 +++ b/mplayer.c Fri Nov 08 21:06:40 2013 +0000 @@ -2746,7 +2746,7 @@ } #ifdef CONFIG_ASS - if (ass_enabled && mpctx->d_sub->sh && ((sh_sub_t *)mpctx->d_sub->sh)->ass_track) + if (ass_enabled && mpctx->d_sub && mpctx->d_sub->sh && ((sh_sub_t *)mpctx->d_sub->sh)->ass_track) ass_flush_events(((sh_sub_t *)mpctx->d_sub->sh)->ass_track); #endif