diff --git a/src/sourcetree/SourcesModel.cpp b/src/sourcetree/SourcesModel.cpp index e0934a368..3a56eded8 100644 --- a/src/sourcetree/SourcesModel.cpp +++ b/src/sourcetree/SourcesModel.cpp @@ -549,7 +549,7 @@ SourcesModel::linkSourceItemToPage( SourceTreeItem* item, ViewPage* p ) // TODO handle removal m_sourceTreeLinks[ p ] = item; - if( m_viewPageDelayedCacheItem == p ) + if ( p && m_viewPageDelayedCacheItem == p ) emit selectRequest( QPersistentModelIndex( indexFromItem( item ) ) ); if ( QObject* obj = dynamic_cast< QObject* >( p ) )