diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 83b41e52ce..5a63c18c60 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -3137,7 +3137,9 @@ apply_texture(TextureContext *tc) { if (tc==NULL) { return; // use enable_texturing to disable/enable } - add_to_texture_record(tc); + #ifdef DO_PSTATS + add_to_texture_record(tc); + #endif // activate(); inactive // bind_texture(tc);