From 8b2c46c5338e8dac45a3106e9a1fb6402d638bbc Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 18 Oct 2008 21:53:07 +0000 Subject: [PATCH] check for focusWidget() being NULL before checking inheritance - fixes crash for example when loading VST plugins git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1775 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/piano.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/piano.cpp b/src/core/piano.cpp index b80550bb5..aa50940c7 100644 --- a/src/core/piano.cpp +++ b/src/core/piano.cpp @@ -719,6 +719,7 @@ void pianoView::focusOutEvent( QFocusEvent * ) // focus just switched to another control inside the instrument track // window we live in? if( parentWidget()->parentWidget()->focusWidget() != this && + parentWidget()->parentWidget()->focusWidget() != NULL && !parentWidget()->parentWidget()-> focusWidget()->inherits( "QLineEdit" ) ) {