diff --git a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp index be69bde50..bc6f26c2f 100644 --- a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp +++ b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp @@ -29,7 +29,7 @@ namespace Nz::GL struct GLWrapper { template - static auto WrapErrorHandling() + auto WrapErrorHandling() { return [](Args... args) -> Ret { @@ -78,7 +78,10 @@ namespace Nz::GL if (func) { if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion - func = GLWrapper>::template WrapErrorHandling(); + { + GLWrapper> wrapper; + func = wrapper.template WrapErrorHandling(); + } } #endif