From f373aa1ce56d8b062689d7d36136ff78665c7d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 12 Aug 2014 09:46:39 +0200 Subject: [PATCH] Improve sanity check in WaylandBackend::create If the WaylandBackend got created without a wl_display we better stop processing. --- wayland_backend.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wayland_backend.cpp b/wayland_backend.cpp index 7c2d57b24a..b341773e60 100644 --- a/wayland_backend.cpp +++ b/wayland_backend.cpp @@ -726,6 +726,11 @@ WaylandBackend *WaylandBackend::create(QObject *parent) return NULL; } s_self = new WaylandBackend(parent); + // check whether it has a display + if (!s_self->display()) { + delete s_self; + s_self = nullptr; + } return s_self; }