diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2016-10-04 16:45:15 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2016-10-06 05:31:02 +0000 |
commit | 43081c1b7a8cc29d6dffc87dd0ef72faecf7233e (patch) | |
tree | f6edf79453cd2e82b1d53a6eb772c99b48b2784b /src/client/qwaylandwindow_p.h | |
parent | 2e44df5f5ca13cac61886d33ce3f4a4232f1ad80 (diff) |
Fix race condition on mFrameCallback
Don't try to destroy the callback from two different threads. This
caused a crash with brcm-egl.
Change-Id: Idcb18fca9ed7f84902b88212c0cebd67932a59d3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r-- | src/client/qwaylandwindow_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 03c4a1e48..e0c42ace5 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -53,6 +53,7 @@ #include <QtCore/QWaitCondition> #include <QtCore/QMutex> +#include <QtCore/QAtomicPointer> #include <QtGui/QIcon> #include <QtCore/QVariant> @@ -220,7 +221,7 @@ protected: WId mWindowId; bool mWaitingForFrameSync; - struct wl_callback *mFrameCallback; + QAtomicPointer<struct wl_callback> mFrameCallback; QWaitCondition mFrameSyncWait; QMutex mResizeLock; |