diff --git a/linphone-desktop/src/components/camera/MSFunctions.hpp b/linphone-desktop/src/components/camera/MSFunctions.hpp index 7320092a7..9b1fc7624 100644 --- a/linphone-desktop/src/components/camera/MSFunctions.hpp +++ b/linphone-desktop/src/components/camera/MSFunctions.hpp @@ -4,11 +4,11 @@ #include #define GL_CALL(CALL) \ - Q_ASSERT(QOpenGLContext::currentContext()->functions() == m_instance->m_q_functions); \ + Q_ASSERT(QOpenGLContext::currentContext()->functions() == m_instance->m_q_functions && m_instance->m_q_functions != NULL); \ m_instance->m_q_functions->CALL; #define GL_CALL_RET(CALL) \ - Q_ASSERT(QOpenGLContext::currentContext()->functions() == m_instance->m_q_functions); \ + Q_ASSERT(QOpenGLContext::currentContext()->functions() == m_instance->m_q_functions && m_instance->m_q_functions != NULL); \ return m_instance->m_q_functions->CALL; // ============================================================================= @@ -193,4 +193,7 @@ private: static MSFunctions *m_instance; }; +#undef GL_CALL +#undef GL_CALL_RET + #endif // MS_FUNCTIONS_H_