From 2bedc3bdd05d3ff05e0ebd592972c7596a73c669 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 30 Aug 2011 11:55:47 -0400 Subject: [PATCH] Extra safety --- .../infosystem/infoplugins/generic/lastfmplugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libtomahawk/infosystem/infoplugins/generic/lastfmplugin.cpp b/src/libtomahawk/infosystem/infoplugins/generic/lastfmplugin.cpp index a752a5d1b..aad9fdbdf 100644 --- a/src/libtomahawk/infosystem/infoplugins/generic/lastfmplugin.cpp +++ b/src/libtomahawk/infosystem/infoplugins/generic/lastfmplugin.cpp @@ -87,6 +87,7 @@ LastFmPlugin::~LastFmPlugin() { qDebug() << Q_FUNC_INFO; delete m_scrobbler; + m_scrobbler = 0; } @@ -753,7 +754,10 @@ LastFmPlugin::settingsChanged() m_pw = TomahawkSettings::instance()->lastFmPassword(); // credentials have changed, have to re-create scrobbler for them to take effect if( m_scrobbler ) + { delete m_scrobbler; + m_scrobbler = 0; + } createScrobbler(); }