Macros: Check and reset currentMacro pointer after deletion

Task-number: QTCREATORBUG-16933
Change-Id: Ib55d5dd4b0478b655d6cb31f28c8ceb38159912f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2016-09-26 08:16:48 +02:00
committed by Christian Stenger
parent e84abe3af1
commit 91b3042cbe

View File

@@ -183,6 +183,8 @@ void MacroManager::MacroManagerPrivate::removeMacro(const QString &name)
// Remove macro from the map // Remove macro from the map
Macro *macro = macros.take(name); Macro *macro = macros.take(name);
if (macro == currentMacro)
currentMacro = 0;
delete macro; delete macro;
} }