diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2019-06-04 14:33:36 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2019-06-05 08:50:08 +0000 |
commit | 280d0e557eabe9410632edf32ed46e712535c45b (patch) | |
tree | 903751bf8768a0eedd51f23c3cc8c0a9a52a748f /src/compositor | |
parent | 5f2e1d94c07c3d4d2f0f24598f8ab385fad3b74c (diff) |
Don't crash at application exit
Qt Quick may destroy objects after QGuiApplication shutdown. It is
not possible to call any QOpenGL functions at that point
(including QOpenGLContext::currentContext()), and there is no
point since the graphics resources will be released by the system
anyway.
Fixes: QTBUG-76053
Change-Id: Ic86c8fb5a34126ab03178cda3071d712582ed496
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/compositor')
-rw-r--r-- | src/compositor/extensions/qwltexturesharingextension.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor/extensions/qwltexturesharingextension.cpp b/src/compositor/extensions/qwltexturesharingextension.cpp index 1c15bb49f..251c5fec0 100644 --- a/src/compositor/extensions/qwltexturesharingextension.cpp +++ b/src/compositor/extensions/qwltexturesharingextension.cpp @@ -129,7 +129,7 @@ public: ~SharedTextureFactory() override { - if (m_buffer) + if (m_buffer && !QCoreApplication::closingDown()) const_cast<QtWayland::ServerBuffer*>(m_buffer)->releaseOpenGlTexture(); } |