[plugins/qpa] Safety checks in native interface
During startup it might happen that the QPA is already loaded, but the wayland server and it's internal connection not yet fully created. Thus safety check for it.
This commit is contained in:
parent
20a9a2a247
commit
6c746764b4
1 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,9 @@ void *NativeInterface::nativeResourceForIntegration(const QByteArray &resource)
|
|||
{
|
||||
const QByteArray r = resource.toLower();
|
||||
if (r == s_displayKey || r == s_wlDisplayKey) {
|
||||
if (!waylandServer() || !waylandServer()->internalClientConection()) {
|
||||
return nullptr;
|
||||
}
|
||||
return waylandServer()->internalClientConection()->display();
|
||||
}
|
||||
if (r == s_compositorKey) {
|
||||
|
@ -60,6 +63,9 @@ void *NativeInterface::nativeResourceForWindow(const QByteArray &resource, QWind
|
|||
{
|
||||
const QByteArray r = resource.toLower();
|
||||
if (r == s_displayKey || r == s_wlDisplayKey) {
|
||||
if (!waylandServer() || !waylandServer()->internalClientConection()) {
|
||||
return nullptr;
|
||||
}
|
||||
return waylandServer()->internalClientConection()->display();
|
||||
}
|
||||
if (r == s_compositorKey) {
|
||||
|
|
Loading…
Reference in a new issue