summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/vulkan/context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c
index eb122d3a67..a478024233 100644
--- a/video/out/vulkan/context.c
+++ b/video/out/vulkan/context.c
@@ -121,7 +121,7 @@ static const struct ra_swapchain_fns vulkan_swapchain;
struct mpvk_ctx *ra_vk_ctx_get(struct ra_ctx *ctx)
{
- if (ctx->swapchain->fns != &vulkan_swapchain)
+ if (!ctx->swapchain || ctx->swapchain->fns != &vulkan_swapchain)
return NULL;
struct priv *p = ctx->swapchain->priv;