Compile without QT_DEBUG.
authorMorten Sorvig <morten.sorvig@nokia.com>
Mon, 29 Aug 2011 09:59:07 +0000 (11:59 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Mon, 29 Aug 2011 10:05:38 +0000 (12:05 +0200)
Change-Id: I3dadcdd83f45451d712703601d46adbc1691291b
Reviewed-on: http://codereview.qt.nokia.com/3727
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/opengl/qopenglframebufferobject.cpp
src/gui/opengl/qopenglshaderprogram.cpp

index 643dc67..3d236ea 100644 (file)
@@ -964,8 +964,8 @@ bool QOpenGLFramebufferObject::release()
     if (!current)
         return false;
 
-#ifdef QT_DEBUG
     Q_D(QOpenGLFramebufferObject);
+#ifdef QT_DEBUG
     if (current->shareGroup() != d->fbo_guard->group())
         qWarning("QOpenGLFramebufferObject::release() called from incompatible context");
 #endif
index 26ffe2b..e8baf11 100644 (file)
@@ -892,8 +892,8 @@ bool QOpenGLShaderProgram::bind()
 */
 void QOpenGLShaderProgram::release()
 {
-#ifndef QT_NO_DEBUG
     Q_D(QOpenGLShaderProgram);
+#ifndef QT_NO_DEBUG
     if (d->programGuard->group() != QOpenGLContextGroup::currentContextGroup())
         qWarning("QOpenGLShaderProgram::release: program is not valid in the current context.");
 #endif