Guard resource deletion in OuptutConfiguration::sendApplied
Summary: A client (kscreen-doctor especially) can disconnect whilst kwin still has an instance. Test Plan: Had reproducible crash on kscreen-doctor. Now don't. Reviewers: #kwin Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D18248
This commit is contained in:
parent
fd4f77d884
commit
613aeb79c5
1 changed files with 6 additions and 0 deletions
|
@ -287,6 +287,9 @@ void OutputConfigurationInterface::setApplied()
|
|||
|
||||
void OutputConfigurationInterface::Private::sendApplied()
|
||||
{
|
||||
if (!resource) {
|
||||
return;
|
||||
}
|
||||
org_kde_kwin_outputconfiguration_send_applied(resource);
|
||||
}
|
||||
|
||||
|
@ -299,6 +302,9 @@ void OutputConfigurationInterface::setFailed()
|
|||
|
||||
void OutputConfigurationInterface::Private::sendFailed()
|
||||
{
|
||||
if (!resource) {
|
||||
return;
|
||||
}
|
||||
org_kde_kwin_outputconfiguration_send_failed(resource);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue