diff options
author | kwangwoong.lee <kwangwoong.lee@lge.com> | 2013-11-01 12:07:10 +0900 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2013-12-11 19:52:06 +0100 |
commit | 3e9412e2fd91e64a565ed8ddbef76f57ca9413d5 (patch) | |
tree | f93c21b334e84bb2db263b4f7d6283a5fd7f127c /src | |
parent | 0bd25167e8d75989312641b119218981af76fb42 (diff) |
Unbind suface item from surface when surface is destroyed
Call setSurceItem(0) for surface which is being destroyed.
Otherwise, surface may have invalid reference for surface item
even after the surface item is deleted.
Change-Id: Ibb7aa19af39a3cd56790e26a36cad8a9d6d9c47e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurfaceitem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp index f39fe8098..cc753934b 100644 --- a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp +++ b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp @@ -288,6 +288,9 @@ void QWaylandSurfaceItem::surfaceUnmapped() void QWaylandSurfaceItem::surfaceDestroyed(QObject *) { + if (m_surface) + m_surface->setSurfaceItem(0); + m_surface = 0; } |