diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index c5c4fc64fc..d5224c31fc 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -3616,9 +3616,9 @@ apply_texture(TextureContext *tc) { #ifndef NDEBUG // sanity check extern char *PandaFilterNameStrs[]; - if((!(dtc->_bHasMipMaps))&&(mipfilter!=D3DTFP_NONE)) { + if((!(dtc->_bHasMipMaps))&&(newMipFilter!=D3DTFP_NONE)) { dxgsg_cat.error() << "Trying to set mipmap filtering for texture with no generated mipmaps!! texname[" << tex->get_name() << "], filter("<_bHasMipMaps))&&(mipfilter!=D3DTEXF_NONE)) { + if((!(dtc->_bHasMipMaps))&&(newMipFilter!=D3DTEXF_NONE)) { dxgsg_cat.error() << "Trying to set mipmap filtering for texture with no generated mipmaps!! texname[" << tex->get_name() << "], filter("<