diff --git a/src/osg/Capability.cpp b/src/osg/Capability.cpp index 53425bc7b..930e3ad8e 100644 --- a/src/osg/Capability.cpp +++ b/src/osg/Capability.cpp @@ -42,7 +42,7 @@ void Enablei::apply(State& state) const if (extensions->glEnablei) { OSG_INFO<<"extensions->glEnablei("<<_capability<<", "<<_index<<")"<glEnablei(_capability, static_cast(_index)); + if (_capability) extensions->glEnablei(_capability, static_cast(_index)); } else { @@ -56,7 +56,7 @@ void Disablei::apply(State& state) const if (extensions->glDisablei) { OSG_INFO<<"extensions->glDisablei("<<_capability<<", "<<_index<<")"<glDisablei(_capability, static_cast(_index)); + if (_capability) extensions->glDisablei(_capability, static_cast(_index)); } else {