resource/material: don't panic if failed to load

This commit is contained in:
Andrei Alexeyev 2021-12-17 19:57:51 +02:00
parent 491cf9d2ce
commit e65a7f1b7f
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -106,9 +106,10 @@ static void material_load_stage1(ResourceLoadState *st) {
if(ld->_map_##_map) { \
ld->mat->_map_##_map = get_resource_data(RES_TEXTURE, ld->_map_##_map, st->flags); \
if(UNLIKELY(ld->mat->_map_##_map == NULL)) { \
log_fatal("%s: failed to load " #_map_ " map '%s'", st->name, ld->_map_##_map); \
log_error("%s: failed to load " #_map_ " map '%s'", st->name, ld->_map_##_map); \
free_mat_load_data(ld); \
res_load_failed(st); \
return; \
} \
} \
} while(0)