summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/contnr/svimpbox.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx3
2 files changed, 8 insertions, 3 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index b53b403c80f1..52d1f9a47f59 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2019,7 +2019,13 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
{
nFlags &= (~LBoxFlags::StartEditTimer);
pView->pHdlEntry = pEntry;
- if( pView->DoubleClickHdl() )
+ if( !pView->DoubleClickHdl() )
+ {
+ // Handler signals nothing to be done anymore, bail out, 'this' may
+ // even be dead and destroyed.
+ return;
+ }
+ else
{
// if the entry was deleted within the handler
pEntry = GetClickedEntry( aPos );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index c236e432e227..8ae4c745e170 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -426,8 +426,7 @@ void SvTreeListBox::DeselectHdl()
bool SvTreeListBox::DoubleClickHdl()
{
- aDoubleClickHdl.Call( this );
- return true;
+ return !aDoubleClickHdl.IsSet() || aDoubleClickHdl.Call(this);
}