diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-15 15:50:15 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-16 08:00:14 +0000 |
commit | 7c6b969383a403474a63715fd7a12caddd826611 (patch) | |
tree | 508ef5136e3bfc08d91ad0589453b2aab5f0608e /src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp | |
parent | 5b3dfa470ed7ea40103daa785286ab71fb7aa230 (diff) |
eglfs: Call destroy() from dtors of concrete windows
Calling destroy from the QEglFSWindow dtor() triggers the virtual
invalidateSurface() to be called on a partly destroyed object. As the
child windows deregister themselves from their screens on
invalidateSurface() this is dangerous: It leaves a dangling pointer in
the screen.
Fixes: QTBUG-75075
Change-Id: Idd3fea18562d41973f364340df875a50dbd5691e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index ecdfb352ab..3e78196227 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -116,6 +116,8 @@ public: , m_egl_stream(EGL_NO_STREAM_KHR) { } + ~QEglFSKmsEglDeviceWindow() { destroy(); } + void invalidateSurface() override; void resetSurface() override; |