Browse Source

08-update: Fixed debug build.

Branimir Karadžić 10 years ago
parent
commit
ae7e4deb2f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      examples/08-update/update.cpp

+ 4 - 1
examples/08-update/update.cpp

@@ -495,7 +495,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 	bgfx::destroyTexture(textureCube);
 	bgfx::destroyTexture(textureCube);
 	bgfx::destroyIndexBuffer(ibh);
 	bgfx::destroyIndexBuffer(ibh);
 	bgfx::destroyVertexBuffer(vbh);
 	bgfx::destroyVertexBuffer(vbh);
-	bgfx::destroyProgram(program3d);
+	if (bgfx::isValid(program3d) )
+	{
+		bgfx::destroyProgram(program3d);
+	}
 	bgfx::destroyProgram(programCmp);
 	bgfx::destroyProgram(programCmp);
 	bgfx::destroyProgram(program);
 	bgfx::destroyProgram(program);
 	bgfx::destroyUniform(u_time);
 	bgfx::destroyUniform(u_time);