summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-06-30 19:01:36 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-06-30 19:01:52 +0200
commit0fefffa6b4f4590b89bf395d67f6448dd407caf9 (patch)
treee918a21553634a1220ca30646faf8b16a27a51a1
parent1689b333008e31d1d7df0a855090e66d6a9a495e (diff)
downloadtdebase-0fefffa6b4f4590b89bf395d67f6448dd407caf9.tar.gz
tdebase-0fefffa6b4f4590b89bf395d67f6448dd407caf9.zip
Fix reset of auto-action in medianotifier
This resolves bug 2941 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit d7f55fefe36a1f30618ab7dd5e6e39cdba98e541)
-rw-r--r--tdeioslave/media/libmediacommon/notifiersettings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tdeioslave/media/libmediacommon/notifiersettings.cpp b/tdeioslave/media/libmediacommon/notifiersettings.cpp
index 40a09ba8e..a957c75c9 100644
--- a/tdeioslave/media/libmediacommon/notifiersettings.cpp
+++ b/tdeioslave/media/libmediacommon/notifiersettings.cpp
@@ -161,8 +161,10 @@ void NotifierSettings::resetAutoAction( const TQString &mimetype )
if ( m_autoMimetypesMap.contains( mimetype ) )
{
NotifierAction *action = m_autoMimetypesMap[mimetype];
- action->removeAutoMimetype( mimetype );
- m_autoMimetypesMap.remove(mimetype);
+ if ( action ) {
+ action->removeAutoMimetype( mimetype );
+ }
+ m_autoMimetypesMap[mimetype] = 0L;
}
}