Improve sanity check in WaylandBackend::create
If the WaylandBackend got created without a wl_display we better stop processing.
This commit is contained in:
parent
670973efdb
commit
f373aa1ce5
1 changed files with 5 additions and 0 deletions
|
@ -726,6 +726,11 @@ WaylandBackend *WaylandBackend::create(QObject *parent)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
s_self = new WaylandBackend(parent);
|
s_self = new WaylandBackend(parent);
|
||||||
|
// check whether it has a display
|
||||||
|
if (!s_self->display()) {
|
||||||
|
delete s_self;
|
||||||
|
s_self = nullptr;
|
||||||
|
}
|
||||||
return s_self;
|
return s_self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue