diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-05-10 18:03:43 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-05-10 18:03:43 +0200 |
commit | 8e8e0b26b6674e15f1ea01b4a1a05169fa762722 (patch) | |
tree | 33699f12d53d3928dcc668790937d5cc24c53ae6 /src/plugins/platforms/wayland | |
parent | 20594a6d5bbbc4d429b944080e7f65d66e6dae43 (diff) |
Prevent crash in wayland mimedata in case there is no offer.
Diffstat (limited to 'src/plugins/platforms/wayland')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandclipboard.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.cpp b/src/plugins/platforms/wayland/qwaylandclipboard.cpp index c1ac386cd6..47ca22865b 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard.cpp +++ b/src/plugins/platforms/wayland/qwaylandclipboard.cpp @@ -199,6 +199,8 @@ void QWaylandClipboard::forceRoundtrip(struct wl_display *display) QVariant QWaylandClipboard::retrieveData(const QString &mimeType, QVariant::Type type) const { Q_UNUSED(type); + if (mOfferedMimeTypes.isEmpty() || !mOffer) + return QVariant(); int pipefd[2]; if (pipe(pipefd) == -1) { qWarning("QWaylandClipboard: pipe() failed"); |