summaryrefslogtreecommitdiffstats
path: root/video/sws_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/sws_utils.c')
-rw-r--r--video/sws_utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/sws_utils.c b/video/sws_utils.c
index 0f1708af3f..5e9c35876a 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -213,6 +213,9 @@ struct mp_sws_context *mp_sws_alloc(void *talloc_ctx)
// if the user changes any options.
void mp_sws_enable_cmdline_opts(struct mp_sws_context *ctx, struct mpv_global *g)
{
+ // Should only ever be NULL for tests.
+ if (!g)
+ return;
if (ctx->opts_cache)
return;