From 6703c06fcd9b8f72166302bdc99ed2be002ccb07 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 18 Jul 2008 22:17:02 +0000 Subject: [PATCH] at destruction check whether mainWindow is still alive git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1342 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/gui/string_pair_drag.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/string_pair_drag.cpp b/src/gui/string_pair_drag.cpp index 5ff8be512..7e6938ea0 100644 --- a/src/gui/string_pair_drag.cpp +++ b/src/gui/string_pair_drag.cpp @@ -5,7 +5,7 @@ * for drag'n'drop of string-pairs and which is the base * for all drag'n'drop-actions within LMMS * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -56,8 +56,10 @@ stringPairDrag::~stringPairDrag() { // during a drag, we might have lost key-press-events, so reset // modifiers of main-win - engine::getMainWindow()->clearKeyModifiers(); - // TODO: do we have to delete anything??? + if( engine::getMainWindow() ) + { + engine::getMainWindow()->clearKeyModifiers(); + } }