summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2021-01-01 17:13:29 +0100
committerNiklas Haas <git@haasn.xyz>2021-01-01 17:14:57 +0100
commit3e175dff4af9d67a5956c6500c33393ac035d3ce (patch)
treea4586472f3dfb5c223813f6ab7e8a4fd7f481cb7
parent4f129a3eca7f8e1d6e3407c0689cbe313debf301 (diff)
downloadmpv-3e175dff4af9d67a5956c6500c33393ac035d3ce.tar.bz2
mpv-3e175dff4af9d67a5956c6500c33393ac035d3ce.tar.xz
vo_gpu: don't segfault if 3DLUT texture fails uploading
This failure path was never properly checked.
-rw-r--r--video/out/gpu/video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index fa2f3a28a3..2aae3171e6 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -664,6 +664,11 @@ static bool gl_video_get_lut3d(struct gl_video *p, enum mp_csp_prim prim,
talloc_free(lut3d);
+ if (!p->lut_3d_texture) {
+ p->use_lut_3d = false;
+ return false;
+ }
+
return true;
}