summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-03-04 16:23:23 +0000
committerFrank Schönheit <fs@openoffice.org>2002-03-04 16:23:23 +0000
commitf60bedd1d307894c1b0ff9d31968a06cdf3b417f (patch)
treed03670d48a673ac53a03f3ba1b8ba0f0c2193a7b
parent1874ecc464bb780e0fa7a4a7eb943f2ca0dd9718 (diff)
#97515# VCLXListBox::SelectHdl: keep the object alive while calling the listeners
-rw-r--r--toolkit/source/awt/vclxwindows.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 82bbc85d47ed..0e40c066db16 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxwindows.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: pb $ $Date: 2002-02-22 08:38:08 $
+ * last change: $Author: fs $ $Date: 2002-03-04 17:23:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1336,7 +1336,13 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( rVclWindowEvent.GetId() == VCLEVENT_LISTBOX_SELECT )
{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox > xKeepAlive( this );
+ // in the DoubleClickHdl, the object may be destroyed, so we have to ensure
+ // that we stay alive as long as we're herein
+ // 97515 - 04.03.2002 - fs@openoffice.org
+
ListBox* pListBox = (ListBox*)GetWindow();
+
sal_Bool bDropDown = ( pListBox->GetStyle() & WB_DROPDOWN ) ? sal_True : sal_False;
if ( bDropDown && maActionListeners.getLength() )
{