summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-02 22:39:20 +0100
committerwm4 <wm4@nowhere>2014-03-02 22:39:20 +0100
commit4bc0e3feac2a39c5ab6cff628bc9494723b94bb4 (patch)
tree38ee112d732341ce7c73546d7e53cda43113a2d5 /player
parent8f2ee917d410094c8718172e417d8d6f5f8f040f (diff)
downloadmpv-4bc0e3feac2a39c5ab6cff628bc9494723b94bb4.tar.bz2
mpv-4bc0e3feac2a39c5ab6cff628bc9494723b94bb4.tar.xz
command: fix null pointer dereference in idle mode
Pressing 'h' in idle mode -> crash.
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index 7b2115b12e..69bfba0975 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3160,7 +3160,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;
@@ -3198,7 +3198,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,