From 62feef3400f00c2910ee6dc5f1cc3b1a0b42a58f Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 1 Dec 2012 00:30:50 +0100 Subject: [PATCH] * Extra safety check. --- .../playlist/PlayableProxyModelPlaylistInterface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp index 7ac75e9eb..0712bb7d3 100644 --- a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp @@ -134,6 +134,10 @@ PlayableProxyModelPlaylistInterface::tracks() const void PlayableProxyModelPlaylistInterface::setCurrentIndex( qint64 index ) { + Q_ASSERT( m_proxyModel ); + if ( m_proxyModel.isNull() ) + return; + PlayableItem* item = static_cast( (void*)index ); if ( index < 0 || !item ) {