From: Alexandr Akulich Date: Sat, 20 Oct 2012 02:24:56 +0000 (+0600) Subject: Deduplicate checking of conditions. X-Git-Tag: upstream/5.2.1~1054 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3937c37638b6e51add4a9ad24ff894a22d0405d4;p=platform%2Fupstream%2Fqtdeclarative.git Deduplicate checking of conditions. Change-Id: I0621db17db2bb8fe885a3a65f6a7a042279c3752 Reviewed-by: Shawn Rutledge Reviewed-by: Frederik Gladhorn --- diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 64fea0b..f73de99 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2470,7 +2470,7 @@ QOpenGLContext *QQuickWindow::openglContext() const void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo) { Q_D(QQuickWindow); - if (d->context && d->context && QThread::currentThread() != d->context->thread()) { + if (d->context && QThread::currentThread() != d->context->thread()) { qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread"); return; } @@ -2502,7 +2502,7 @@ void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo) void QQuickWindow::setRenderTarget(uint fboId, const QSize &size) { Q_D(QQuickWindow); - if (d->context && d->context && QThread::currentThread() != d->context->thread()) { + if (d->context && QThread::currentThread() != d->context->thread()) { qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread"); return; }