From 10d22b08718b651b69571fd1ff5596934d14a476 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 12 Nov 2012 21:40:20 +0200 Subject: [PATCH] InfoBar: Prevent potential leak Change-Id: I997e84554e56fe67cdde2801108562bb788506c4 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/infobar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/infobar.cpp b/src/plugins/coreplugin/infobar.cpp index 1aa904ce262..a2eb2d93108 100644 --- a/src/plugins/coreplugin/infobar.cpp +++ b/src/plugins/coreplugin/infobar.cpp @@ -210,8 +210,7 @@ void InfoBarDisplay::update() void InfoBarDisplay::widgetDestroyed() { - // This means that the parent is being deleted - m_infoWidgets.clear(); + m_infoWidgets.removeOne(static_cast(sender())); } void InfoBarDisplay::cancelButtonClicked()