From 77ff44216a0b23946d738f106ea8e255f96b18f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 8 Dec 2012 14:52:32 +0100 Subject: [PATCH] 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 --- client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client.cpp b/client.cpp index fa16234def..b555c11cc6 100644 --- a/client.cpp +++ b/client.cpp @@ -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(order.at(idx));