Prefer holding a reference to an object we're going to call
Summary: It's more correct and fixes a warning Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28430
This commit is contained in:
parent
7db9129521
commit
27634d00c0
1 changed files with 1 additions and 1 deletions
|
@ -780,7 +780,7 @@ void XdgShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
|||
// call into decoration update borders
|
||||
if (isDecorated() && decoration()->client() && !(options->borderlessMaximizedWindows() && m_requestedMaximizeMode == KWin::MaximizeFull)) {
|
||||
changeMaximizeRecursion = true;
|
||||
const auto c = decoration()->client().data();
|
||||
const auto c = decoration()->client().toStrongRef();
|
||||
if ((m_requestedMaximizeMode & MaximizeVertical) != (oldMode & MaximizeVertical)) {
|
||||
emit c->maximizedVerticallyChanged(m_requestedMaximizeMode & MaximizeVertical);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue