[server] Add resource check in QtExtendedSurfaceInterface::close
Summary: The QtExtendedSurfaceInterface might be unbound and thus the resource might be null when calling into close. Thus we need to do a nullptr check. Hit a crash there. Test Plan: Unfortunately no test case as we don't have a client side implementation for this. Reviewers: #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D1961
This commit is contained in:
parent
262b49d713
commit
3f69ab1bf0
1 changed files with 3 additions and 0 deletions
|
@ -219,6 +219,9 @@ QtExtendedSurfaceInterface::Private *QtExtendedSurfaceInterface::d_func() const
|
|||
void QtExtendedSurfaceInterface::close()
|
||||
{
|
||||
Q_D();
|
||||
if (!d->resource) {
|
||||
return;
|
||||
}
|
||||
qt_extended_surface_send_close(d->resource);
|
||||
d->client->flush();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue