diff --git a/src/resource/texture_loader/basisu.c b/src/resource/texture_loader/basisu.c index 8d26f480..bb3f82f5 100644 --- a/src/resource/texture_loader/basisu.c +++ b/src/resource/texture_loader/basisu.c @@ -362,8 +362,6 @@ uncompressed: } assert(qr.supplied_pixmap_format_supported); - assert(qr.supplied_pixmap_origin_supported); - return qr.optimal_pixmap_format; } diff --git a/src/resource/texture_loader/texture_loader.c b/src/resource/texture_loader/texture_loader.c index ebf443d5..a873ef5c 100644 --- a/src/resource/texture_loader/texture_loader.c +++ b/src/resource/texture_loader/texture_loader.c @@ -852,11 +852,22 @@ static void texture_loader_stage2(ResourceLoadState *st) { texture = r_texture_create(&p); + if(!texture) { + texture_loader_failed(ld); + return; + } + char namebuf[strlen(st->name) + sizeof(" (transient)")]; snprintf(namebuf, sizeof(namebuf), "%s (transient)", st->name); r_texture_set_debug_label(texture, namebuf); } else { texture = r_texture_create(&ld->params); + + if(!texture) { + texture_loader_failed(ld); + return; + } + r_texture_set_debug_label(texture, st->name); }