diff --git a/src/libtomahawk/Album.cpp b/src/libtomahawk/Album.cpp index 35c3db7a9..0995a2f0f 100644 --- a/src/libtomahawk/Album.cpp +++ b/src/libtomahawk/Album.cpp @@ -176,10 +176,12 @@ Album::id() const s_albumsById[ m_id ] = m_ownRef.toStrongRef(); s_idMutex.unlock(); } - catch( boost::future_uninitialized& e ) + catch( const boost::future_uninitialized& e ) { qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?"; qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForId << e.what(); + + Q_ASSERT( !m_waitingForId ); } } diff --git a/src/libtomahawk/Artist.cpp b/src/libtomahawk/Artist.cpp index aaca5b52d..16b70efc2 100644 --- a/src/libtomahawk/Artist.cpp +++ b/src/libtomahawk/Artist.cpp @@ -256,10 +256,12 @@ Artist::id() const s_artistsById[ m_id ] = m_ownRef.toStrongRef(); s_idMutex.unlock(); } - catch( boost::future_uninitialized& e ) + catch( const boost::future_uninitialized& e ) { qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?"; qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForFuture << e.what(); + + Q_ASSERT( !m_waitingForFuture ); } }