From d7f55fefe36a1f30618ab7dd5e6e39cdba98e541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 30 Jun 2018 19:01:36 +0200 Subject: [PATCH] Fix reset of auto-action in medianotifier This resolves bug 2941 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdeioslave/media/libmediacommon/notifiersettings.cpp | 6 ++++-- 1 file 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; } }