summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-18 20:10:28 +0100
committerwm4 <wm4@nowhere>2016-01-18 20:10:55 +0100
commit5053f4cc3f48538c3d9a3ba13dc98442f3302052 (patch)
tree81b5fe792cf6107a9a252bd885007d5c2c53f286 /player
parent46bcdb7039cdf146966075f268c68b0fcee5ebbf (diff)
downloadmpv-5053f4cc3f48538c3d9a3ba13dc98442f3302052.tar.bz2
mpv-5053f4cc3f48538c3d9a3ba13dc98442f3302052.tar.xz
command: fix NULL pointer deref in "video-codec" property
Fixes #2729.
Diffstat (limited to 'player')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 3c7cfb282d..413349dce3 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2438,7 +2438,7 @@ static int mp_property_video_codec(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
- const char *c = track->d_video ? track->d_video->decoder_desc : NULL;
+ const char *c = track && track->d_video ? track->d_video->decoder_desc : NULL;
return m_property_strdup_ro(action, arg, c);
}