Don't assume we always have a shell
The mininimal-cpp compositor example does not have any shell extensions. Change-Id: Ifec2822ef4f5944eed02c19ddfc47419051364a4 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
673cdbe1e0
commit
6cb80c8a53
@ -84,7 +84,8 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle)
|
|||||||
|
|
||||||
QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window)
|
QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window)
|
||||||
{
|
{
|
||||||
Q_ASSERT(mWaylandIntegration->shellIntegration());
|
if (!mWaylandIntegration->shellIntegration())
|
||||||
|
return 0;
|
||||||
return mWaylandIntegration->shellIntegration()->createShellSurface(window);
|
return mWaylandIntegration->shellIntegration()->createShellSurface(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,9 +399,7 @@ void QWaylandIntegration::initializeShellIntegration()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT(mShellIntegration);
|
if (!mShellIntegration || !mShellIntegration->initialize(mDisplay)) {
|
||||||
|
|
||||||
if (!mShellIntegration->initialize(mDisplay)) {
|
|
||||||
delete mShellIntegration;
|
delete mShellIntegration;
|
||||||
mShellIntegration = Q_NULLPTR;
|
mShellIntegration = Q_NULLPTR;
|
||||||
qWarning("Failed to load shell integration %s", qPrintable(targetKey));
|
qWarning("Failed to load shell integration %s", qPrintable(targetKey));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user