diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-10-02 12:35:50 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-10-02 12:16:03 +0000 |
commit | 5966c7dc5be84be3249dd9e4ba3f8520901b4afe (patch) | |
tree | f0d5ad77d1583df68e97c5928e7f1a25797d8aff /src/compositor/global | |
parent | 4387803683d861deaf225e13e4b7d3238541b6bf (diff) |
Avoid double delete
Extension resources are destroyed by Wayland, and we delete the
corresponding classes when that happens. This means that we must
not delete the extensions when the container is deleted.
Change-Id: I0842e40ab8e8861a623d0fcb47dfd3cf71417d4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/compositor/global')
-rw-r--r-- | src/compositor/global/qwaylandextension.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compositor/global/qwaylandextension.cpp b/src/compositor/global/qwaylandextension.cpp index d42f7e4be..124ebb35e 100644 --- a/src/compositor/global/qwaylandextension.cpp +++ b/src/compositor/global/qwaylandextension.cpp @@ -125,10 +125,8 @@ bool QWaylandExtension::event(QEvent *event) QWaylandExtensionContainer::~QWaylandExtensionContainer() { - foreach (QWaylandExtension *extension, extension_vector) { + foreach (QWaylandExtension *extension, extension_vector) QWaylandExtensionPrivate::get(extension)->extension_container = Q_NULLPTR; - delete extension; - } } QWaylandExtension *QWaylandExtensionContainer::extension(const QByteArray &name) |