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
|
#ifndef QT_NO_OPENGL
|
||||||
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
||||||
Q_ASSERT(ctx);
|
if (ctx) {
|
||||||
if (textureId)
|
if (textureId)
|
||||||
ctx->functions()->glDeleteTextures(1, &textureId);
|
ctx->functions()->glDeleteTextures(1, &textureId);
|
||||||
if (blitter)
|
if (blitter)
|
||||||
blitter->destroy();
|
blitter->destroy();
|
||||||
|
} else if (textureId || blitter) {
|
||||||
|
qWarning("No context current during QPlatformBackingStore destruction, OpenGL resources not released");
|
||||||
|
}
|
||||||
delete blitter;
|
delete blitter;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user