summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-05-03 16:46:01 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-05-04 10:36:14 +0000
commitf91d71d961c331be8030b6c7a916bed2004ddcf7 (patch)
tree67765348914ce76b793b9186d0d00e3022f2bf49 /src/compositor/wayland_wrapper
parent8fa66721a38557a6b11d7ca8b0e6591d64b7742b (diff)
Don't send release events for uncommitted buffers
Fixes crashing GTK clients. Change-Id: I8d2717aa290a7a668af1b8b978447fbefd8ae665 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
index a6509b030..c7bdbcee5 100644
--- a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
@@ -92,7 +92,8 @@ void SurfaceBuffer::initialize(struct ::wl_resource *buffer)
void SurfaceBuffer::destructBufferState()
{
if (m_buffer) {
- sendRelease();
+ if (m_committed)
+ sendRelease();
wl_list_remove(&m_destroy_listener.listener.link);
}
m_buffer = 0;