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 11:32:34 +0000 |
commit | dbe1775f7e1b71696ee64f8b23c998f787e6e7ed (patch) | |
tree | f6dea00031beeae2de14a21411183be5b88fae20 | |
parent | 70d422afb8f631e14140f22b01256013b28b7034 (diff) |
Don't crash at application exitwip/texturesharing-5.12
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>
(cherry picked from commit 280d0e557eabe9410632edf32ed46e712535c45b)
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-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(); } |