Commit 89f8c4a1 authored by Thomas Lübking's avatar Thomas Lübking
Browse files

invalidate old shade_below before searching a new

for the search could be implicitly skipped and we end up
with a dangeling pointer

BUG: 311340
FIXED-IN: 4.10
parent 68aae928
......@@ -983,6 +983,8 @@ void Client::setShade(ShadeMode mode)
setActive(true);
if (shade_mode == ShadeHover) {
ToplevelList order = workspace()->stackingOrder();
// invalidate, since "this" could be the topmost toplevel and shade_below dangeling
shade_below = NULL;
// this is likely related to the index parameter?!
for (int idx = order.indexOf(this) + 1; idx < order.count(); ++idx) {
shade_below = qobject_cast<Client*>(order.at(idx));
......
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