diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 0cbbcf5e7e..e883951a01 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -340,9 +340,11 @@ release_texture(TextureContext *tc) { //////////////////////////////////////////////////////////////////// ShaderContext *CLP(GraphicsStateGuardian):: prepare_shader(ShaderExpansion *se) { +#ifdef HAVE_CGDX9 CLP(ShaderContext) *result = new CLP(ShaderContext)(se, this); if (this -> _cg_context) return result; delete result; +#endif return NULL; }