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: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
parent
e4d1bf9829
commit
c83eefff97
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user