From 1f5c8b5ba118c3700f0aac8652f400bf316a97b9 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 8 May 2002 09:33:11 +0000 Subject: fixed checking on focused_window in handleKeyEvents --- src/fluxbox.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index cf3a6d4..f61eca2 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.55 2002/05/02 07:14:21 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.56 2002/05/08 09:33:11 fluxgen Exp $ //Use GNU extensions #ifndef _GNU_SOURCE @@ -1188,16 +1188,20 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { screen->rightWorkspace(key->getParam()); break; case Keys::KILLWINDOW: //kill the current window - XKillClient(screen->getBaseDisplay()->getXDisplay(), - focused_window->getClientWindow()); + if (focused_window) { + XKillClient(screen->getBaseDisplay()->getXDisplay(), + focused_window->getClientWindow()); + } break; case Keys::NEXTWINDOW: //activate next window screen->nextFocus(key->getParam()); - focused_window->getTab()->raise(); + if (focused_window) + focused_window->getTab()->raise(); break; case Keys::PREVWINDOW: //activate prev window screen->prevFocus(key->getParam()); - focused_window->getTab()->raise(); + if (focused_window) + focused_window->getTab()->raise(); break; case Keys::NEXTTAB: if (focused_window && focused_window->getTab()) { @@ -1944,7 +1948,7 @@ void Fluxbox::load_rc(void) { if (!m_rc_menufile->size()) m_rc_menufile.setDefaultValue(); - delete tmpvar; + delete [] tmpvar; } else m_rc_menufile.setDefaultValue(); -- cgit v0.11.2