summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/shader_cache.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-01-10 18:59:21 +0100
committersfan5 <sfan5@live.de>2023-01-12 22:02:07 +0100
commit7b03cd367dd5416a4728ccea7e47dcd2827cbab7 (patch)
treecea4075b81850000890f55d6cd01de117a2138a0 /video/out/gpu/shader_cache.c
parentb6b83805183618f3a46f2cc77d85dcff72ef6396 (diff)
downloadmpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.bz2
mpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.xz
various: replace if + abort() with MP_HANDLE_OOM()
MP_HANDLE_OOM also aborts but calls assert() first, which will result in an useful message if compiled in debug mode.
Diffstat (limited to 'video/out/gpu/shader_cache.c')
-rw-r--r--video/out/gpu/shader_cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index 5436881ded..1d5e563cb8 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -579,8 +579,7 @@ static bool create_pass(struct gl_shader_cache *sc, struct sc_entry *entry)
cache_dir = mp_get_user_path(tmp, sc->global, sc->cache_dir);
struct AVSHA *sha = av_sha_alloc();
- if (!sha)
- abort();
+ MP_HANDLE_OOM(sha);
av_sha_init(sha, 256);
av_sha_update(sha, entry->total.start, entry->total.len);