summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-02 11:26:34 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-06 16:45:39 +0100
commita86f6be7d9602025877fdc95e3d6f81008aa1dc4 (patch)
treed08b9a690d841abbcdfb4125c7aaec221619802d
parent4dbc1aaf31d231d7d9dd63ac393c5e176c9db268 (diff)
widget leak on filling non-existing infobar in help
Window () with live children destroyed: PushButton (Edit document) Change-Id: I2aa05f59f08cfa78ba895933ef298908a9cbb675
-rw-r--r--sfx2/source/view/viewfrm.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 9f79c20a555d..39dcc206c22e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3356,6 +3356,14 @@ void SfxViewFrame::AppendInfoBar( const OUString& sId, const OUString& sMessage,
pInfoBars->appendInfoBar( sId, sMessage, aButtons );
ShowChildWindow( nId );
}
+ else
+ {
+ SAL_WARN( "sfx.view", "No consumer for InfoBar buttons, so deleting them instead" );
+ for (std::vector< PushButton* >::iterator it = aButtons.begin(); it != aButtons.end(); ++it)
+ {
+ delete *it;
+ }
+ }
}
void SfxViewFrame::RemoveInfoBar( const OUString& sId )