diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 0f962ea0..4c021e23 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -495,7 +495,10 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::destroyTexture(textureCube); bgfx::destroyIndexBuffer(ibh); bgfx::destroyVertexBuffer(vbh); - bgfx::destroyProgram(program3d); + if (bgfx::isValid(program3d) ) + { + bgfx::destroyProgram(program3d); + } bgfx::destroyProgram(programCmp); bgfx::destroyProgram(program); bgfx::destroyUniform(u_time);