diff --git a/src/wayland/shadow.cpp b/src/wayland/shadow.cpp index 1a6e5eed46..4b831e5446 100644 --- a/src/wayland/shadow.cpp +++ b/src/wayland/shadow.cpp @@ -139,12 +139,12 @@ void ShadowInterfacePrivate::org_kde_kwin_shadow_commit(Resource *resource) { #define BUFFER(__FLAG__, __PART__) \ if (pending.flags & State::Flags::__FLAG__##Buffer) { \ - if (current.__PART__) { \ - current.__PART__->unref(); \ - } \ if (pending.__PART__) { \ pending.__PART__->ref(); \ } \ + if (current.__PART__) { \ + current.__PART__->unref(); \ + } \ current.__PART__ = pending.__PART__; \ } BUFFER(Left, left)