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
This commit is contained in:
parent
5faa328f04
commit
77ff44216a
1 changed files with 2 additions and 0 deletions
|
@ -983,6 +983,8 @@ void Client::setShade(ShadeMode mode)
|
||||||
setActive(true);
|
setActive(true);
|
||||||
if (shade_mode == ShadeHover) {
|
if (shade_mode == ShadeHover) {
|
||||||
ToplevelList order = workspace()->stackingOrder();
|
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?!
|
// this is likely related to the index parameter?!
|
||||||
for (int idx = order.indexOf(this) + 1; idx < order.count(); ++idx) {
|
for (int idx = order.indexOf(this) + 1; idx < order.count(); ++idx) {
|
||||||
shade_below = qobject_cast<Client*>(order.at(idx));
|
shade_below = qobject_cast<Client*>(order.at(idx));
|
||||||
|
|
Loading…
Reference in a new issue