diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-27 08:35:45 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-27 08:35:45 +0100 |
commit | 8c57e8c012d1045f2bdb30d376625a32c33fdfc4 (patch) | |
tree | 33cdd83e82fd59aa4b750f3e2dda3c445cd37abf /src/gui/painting | |
parent | b13801fd550d4eef2e45ac3e11304571e0146dd9 (diff) | |
parent | c83eefff976a5f2cd673f6b4a95922b13855dd29 (diff) |
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
src/network/socket/qnativesocketengine_p.h
src/network/ssl/qsslsocket_mac.cpp
src/network/ssl/qsslsocket_mac_p.h
src/widgets/kernel/qwidget.cpp
Change-Id: I39592cb37d710dfaf8640769ba3c1b637927d7f4
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 5f873bfe7e..4e26d8f741 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -75,8 +75,15 @@ public: ~QPlatformBackingStorePrivate() { #ifndef QT_NO_OPENGL - if (blitter) - blitter->destroy(); + QOpenGLContext *ctx = QOpenGLContext::currentContext(); + 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 } |