From b732a26f598588dc7524c289c2c4b09db9d81898 Mon Sep 17 00:00:00 2001 From: bradleyhughes Date: Tue, 6 Dec 2005 09:06:17 +0000 Subject: [PATCH] avoid dangling pointers by setting them to zero after deleting --- src/Window.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Window.cc b/src/Window.cc index b1361ae..c61a30e 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1239,6 +1239,7 @@ BlackboxWindow::~BlackboxWindow(void) { if (client.strut) { _screen->removeStrut(client.strut); delete client.strut; + client.strut = 0; } BWindowGroup *group = findWindowGroup(); @@ -1769,7 +1770,7 @@ void BlackboxWindow::grabButtons(void) { ButtonReleaseMask, GrabModeAsync, GrabModeAsync, frame.window, None, blackbox->resource().allowScrollLock()); - + blackbox->grabButton(Button3, Mod4Mask, frame.window, True, ButtonReleaseMask, GrabModeAsync, GrabModeAsync, frame.window, None, @@ -3310,6 +3311,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent * const event) { } else { _screen->removeStrut(client.strut); delete client.strut; + client.strut = 0; } } -- 2.11.4.GIT