summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-02 22:39:20 +0100
committerwm4 <wm4@nowhere>2014-03-11 00:19:26 +0100
commit542bcdfc9d0a6f69967a022246a5c37039939223 (patch)
tree4d7fdda9af2b0d4cfb6d5d1ec754cea4f2065a00
parent218667b5a235dddfd3a8f8f19cb6e1c2a20fb00c (diff)
downloadmpv-542bcdfc9d0a6f69967a022246a5c37039939223.tar.bz2
mpv-542bcdfc9d0a6f69967a022246a5c37039939223.tar.xz
command: fix null pointer dereference in idle mode
Pressing 'h' in idle mode -> crash.
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index 8c199258a2..a1cecb6f2b 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2941,7 +2941,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
}
#endif /* HAVE_PVR */
#if HAVE_DVBIN
- if (mpctx->stream->type == STREAMTYPE_DVB) {
+ if (mpctx->stream && mpctx->stream->type == STREAMTYPE_DVB) {
int dir;
int v = cmd->args[0].v.i;
@@ -2979,7 +2979,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
#if HAVE_DVBIN
case MP_CMD_DVB_SET_CHANNEL:
- if (mpctx->stream->type == STREAMTYPE_DVB) {
+ if (mpctx->stream && mpctx->stream->type == STREAMTYPE_DVB) {
mpctx->last_dvb_step = 1;
if (dvb_set_channel(mpctx->stream, cmd->args[1].v.i,