summaryrefslogtreecommitdiffstats
path: root/src/render/texture/gltexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/texture/gltexture.cpp')
-rw-r--r--src/render/texture/gltexture.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/render/texture/gltexture.cpp b/src/render/texture/gltexture.cpp
index bc2a1d464..854789e94 100644
--- a/src/render/texture/gltexture.cpp
+++ b/src/render/texture/gltexture.cpp
@@ -188,13 +188,11 @@ QOpenGLTexture* GLTexture::getOrCreateGLTexture()
if (!m_gl) {
m_gl = buildGLTexture();
- if (m_gl) {
- m_gl->allocateStorage();
- if (!m_gl->isStorageAllocated()) {
- qWarning() << Q_FUNC_INFO << "texture storage allocation failed";
- return nullptr;
- }
- } else {
+ if (!m_gl)
+ return nullptr;
+ m_gl->allocateStorage();
+ if (!m_gl->isStorageAllocated()) {
+ qWarning() << Q_FUNC_INFO << "texture storage allocation failed";
return nullptr;
}
}