mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 13:48:08 +00:00
feat(src/components/camera/MSFunctions): fortify asserts
This commit is contained in:
parent
fedf0cae8f
commit
68529e335b
1 changed files with 5 additions and 2 deletions
|
|
@ -4,11 +4,11 @@
|
|||
#include <QOpenGLFunctions>
|
||||
|
||||
#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_
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue