summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-08-22 16:29:29 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-08-28 13:58:46 +0000
commiteeaaac8f0e18680f80a142492675fa90a743f4ec (patch)
treef2b078685dc5f05fcb6d350a244ab4b1e75420f5 /src/platformsupport
parent30331afda118002bb91f74bc5fd3a8a9b294a17c (diff)
Remove unneded pointer check
CID 158429 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking ctx suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Coverity-Id: 158429 Change-Id: I6d202599e962dae5ea4a45401f34237dd496d38b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
index dbaaf524e8..b24491b187 100644
--- a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
+++ b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -101,7 +101,7 @@ QOpenGLCompositorBackingStore::~QOpenGLCompositorBackingStore()
ctx->makeCurrent(tempSurface.data());
}
- if (ctx && m_bsTextureContext && ctx->shareGroup() == m_bsTextureContext->shareGroup())
+ if (m_bsTextureContext && ctx->shareGroup() == m_bsTextureContext->shareGroup())
glDeleteTextures(1, &m_bsTexture);
else
qWarning("QOpenGLCompositorBackingStore: Texture is not valid in the current context");