diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 3b18ad618b..f31d594481 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -4054,7 +4054,7 @@ void DXGraphicsStateGuardian:: issue_color(const ColorAttribute *attrib) { bool bAttribOn=attrib->is_on(); - bool bIsReal = attrib->is_real(); + bool bIsReal = (bAttribOn ? attrib->is_real() : false); _issued_color_enabled = bAttribOn;