mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-24 16:48:18 -05:00
Fixed image loading error handling in 20-nanovg
nvgCreateImage returns 0 on failure, not bgfx::invalidHandle!
This commit is contained in:
parent
4a1861f367
commit
fef9262866
1 changed files with 1 additions and 1 deletions
|
@ -946,7 +946,7 @@ int loadDemoData(struct NVGcontext* vg, struct DemoData* data)
|
|||
char file[128];
|
||||
bx::snprintf(file, 128, "images/image%d.jpg", ii+1);
|
||||
data->images[ii] = nvgCreateImage(vg, file, 0);
|
||||
if (data->images[ii] == bgfx::invalidHandle)
|
||||
if (data->images[ii] == 0)
|
||||
{
|
||||
printf("Could not load %s.\n", file);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue