summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-10 14:00:08 +0300
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-10 19:14:55 +0200
commit9bf1e7ddce29dd2d84d514b37c87fe7f9adc5b63 (patch)
treefd3cc93527ac2c3bafcb5df025b5e656c16889b6 /src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
parentbce79256f32e1e14858d4a63d17e000fd78a8a0f (diff)
Do not crash all the time with shm apps
Change-Id: Iea42adf18cbd724f1f9dc19ec1d1f6baeff07d97 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
index 5858f2478..d21a9950a 100644
--- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
@@ -265,10 +265,11 @@ QImage *QWaylandShmBackingStore::entireSurface() const
void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t time)
{
- Q_UNUSED(callback);
Q_UNUSED(time);
QWaylandShmBackingStore *self =
static_cast<QWaylandShmBackingStore *>(data);
+ if (callback != self->mFrameCallback) // others, like QWaylandWindow, may trigger callbacks too
+ return;
QWaylandWindow *window = self->waylandWindow();
wl_callback_destroy(self->mFrameCallback);
self->mFrameCallback = 0;