diff options
Diffstat (limited to 'mpvcore/screenshot.c')
-rw-r--r-- | mpvcore/screenshot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mpvcore/screenshot.c b/mpvcore/screenshot.c index 161bfac1e5..181292474b 100644 --- a/mpvcore/screenshot.c +++ b/mpvcore/screenshot.c @@ -316,8 +316,10 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode) struct voctrl_screenshot_args args = { .full_window = (mode == MODE_FULL_WINDOW) }; - struct vf_instance *vfilter = mpctx->sh_video->vfilter; - vfilter->control(vfilter, VFCTRL_SCREENSHOT, &args); + if (mpctx->sh_video && mpctx->sh_video->vfilter) { + struct vf_instance *vfilter = mpctx->sh_video->vfilter; + vfilter->control(vfilter, VFCTRL_SCREENSHOT, &args); + } if (!args.out_image) vo_control(mpctx->video_out, VOCTRL_SCREENSHOT, &args); |