From 46b1b1b885623582e5dfecc1deb0688a94c83547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 26 Feb 2016 20:09:13 -0800 Subject: [PATCH] Cleanup. --- examples/common/debugdraw/debugdraw.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/common/debugdraw/debugdraw.cpp b/examples/common/debugdraw/debugdraw.cpp index 8493b87f6..f297d1650 100644 --- a/examples/common/debugdraw/debugdraw.cpp +++ b/examples/common/debugdraw/debugdraw.cpp @@ -467,9 +467,10 @@ struct DebugDraw { bgfx::destroyIndexBuffer(m_ibh); bgfx::destroyVertexBuffer(m_vbh); - bgfx::destroyProgram(m_program[0]); - bgfx::destroyProgram(m_program[1]); - bgfx::destroyProgram(m_program[2]); + for (uint32_t ii = 0; ii < Program::Count; ++ii) + { + bgfx::destroyProgram(m_program[ii]); + } bgfx::destroyUniform(u_params); }