mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-08 10:21:40 +00:00
[vulkan] Return nullptr for missing cachepics
Better than storing such in the hash table only to get a segfault on shutdown.
This commit is contained in:
parent
743b06d5c1
commit
1d0b0f85af
1 changed files with 3 additions and 0 deletions
|
@ -807,6 +807,9 @@ Vulkan_Draw_CachePic (const char *path, bool alpha, vulkan_ctx_t *ctx)
|
|||
return cpic->pic;
|
||||
}
|
||||
qpic_t *pic = load_lmp (path, ctx);
|
||||
if (!pic) {
|
||||
return nullptr;
|
||||
}
|
||||
cpic = new_cachepic (dctx, path, pic);
|
||||
Hash_Add (dctx->pic_cache, cpic);
|
||||
return pic;
|
||||
|
|
Loading…
Reference in a new issue