summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 6487a8b346..caf1ca5037 100644
--- a/command.c
+++ b/command.c
@@ -2492,6 +2492,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_SWITCH_RATIO:
+ if (!sh_video)
+ break;
if (cmd->nargs == 0 || cmd->args[0].v.f == -1)
opts->movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
else
@@ -2996,6 +2998,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_VF_CHANGE_RECTANGLE:
+ if (!sh_video)
+ break;
set_rectangle(sh_video, cmd->args[0].v.i, cmd->args[1].v.i);
break;