summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/gpu/shader_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index afda9cc036..ead759d931 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -871,8 +871,10 @@ static void gl_sc_generate(struct gl_shader_cache *sc,
sc->error_state = true;
MP_TARRAY_APPEND(sc, sc->entries, sc->num_entries, entry);
}
- if (sc->error_state)
+ if (sc->error_state) {
+ sc->current_shader = NULL;
return;
+ }
assert(sc->num_uniforms == entry->num_cached_uniforms);