Commit c83eefff authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Liang Qi
Browse files

Remove incorrect assertion from the backingstore


The ifdef gave an impression of the code path being hit only when
texture-backed widgets are present and OpenGL-based compositing is
active. This is false. Asserting on having a context current is
wrong (as shown by autotests on the 5.6 branch).

Change-Id: I2539f0aac75b26597f49f63edcd9580428be79b7
Reviewed-by: default avatarGunnar Sletta <gunnar@sletta.org>
Showing with 8 additions and 5 deletions
......@@ -66,11 +66,14 @@ public:
{
#ifndef QT_NO_OPENGL
QOpenGLContext *ctx = QOpenGLContext::currentContext();
Q_ASSERT(ctx);
if (textureId)
ctx->functions()->glDeleteTextures(1, &textureId);
if (blitter)
blitter->destroy();
if (ctx) {
if (textureId)
ctx->functions()->glDeleteTextures(1, &textureId);
if (blitter)
blitter->destroy();
} else if (textureId || blitter) {
qWarning("No context current during QPlatformBackingStore destruction, OpenGL resources not released");
}
delete blitter;
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment