Improve sanity check in WaylandBackend::create

If the WaylandBackend got created without a wl_display we better
stop processing.
icc-effect-5.14.5
Martin Gräßlin 2014-08-12 09:46:39 +02:00
parent 670973efdb
commit f373aa1ce5
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}