resource/texture_loader: remove bad assert; handle r_texture_create() failure
This commit is contained in:
parent
26959c4a1f
commit
718fc9685f
2 changed files with 11 additions and 2 deletions
|
@ -362,8 +362,6 @@ uncompressed:
|
|||
}
|
||||
|
||||
assert(qr.supplied_pixmap_format_supported);
|
||||
assert(qr.supplied_pixmap_origin_supported);
|
||||
|
||||
return qr.optimal_pixmap_format;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue