[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:
Bill Currie 2024-01-31 00:14:16 +09:00
parent 743b06d5c1
commit 1d0b0f85af

View file

@ -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;