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
This commit is contained in:
Tobias Doerffel
2008-10-18 21:53:07 +00:00
parent 60a6ae0282
commit 8b2c46c533

View File

@@ -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" ) )
{