From fef92628668525bbcfc89b55185dbace1ea56a45 Mon Sep 17 00:00:00 2001 From: Stephen Hill Date: Sat, 28 Nov 2015 14:48:05 -0500 Subject: [PATCH] Fixed image loading error handling in 20-nanovg nvgCreateImage returns 0 on failure, not bgfx::invalidHandle! --- examples/20-nanovg/nanovg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/20-nanovg/nanovg.cpp b/examples/20-nanovg/nanovg.cpp index 3f31e2c6..06972d8d 100644 --- a/examples/20-nanovg/nanovg.cpp +++ b/examples/20-nanovg/nanovg.cpp @@ -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;