From e789066b9b235b7886c4bc0c7ab683708b577513 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 10 Sep 2011 09:34:17 +0200 Subject: [PATCH] * Fixed SourceList's get( id ) for id being 0. --- src/libtomahawk/sourcelist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/sourcelist.cpp b/src/libtomahawk/sourcelist.cpp index 0ed9bf10e..9f1d7e34c 100644 --- a/src/libtomahawk/sourcelist.cpp +++ b/src/libtomahawk/sourcelist.cpp @@ -167,7 +167,11 @@ source_ptr SourceList::get( int id ) const { QMutexLocker lock( &m_mut ); - return m_sources.value( m_sources_id2name.value( id ) ); + + if ( id == 0 ) + return SourceList::instance()->getLocal(); + else + return m_sources.value( m_sources_id2name.value( id ) ); }