Commit 27634d00 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

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
parent 7db91295
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment