sfx2/source/doc/sfxbasemodel.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 39fa034db32fa07a7f2a7afe77f7d1c047b5cad8
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Feb 14 10:21:20 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Feb 14 17:37:42 2024 +0100

    tdf#159707: fix crash when changing to edit mode (calc)
    
    bt:
    0x00007f9eb4b902f2 in 
com::sun::star::uno::Reference<com::sun::star::frame::XModel>::operator->() 
const (this=0x55b8c2b54888) at include/com/sun/star/uno/Reference.h:387
    0x00007f9eb4c03584 in 
ScVbaEventsHelper::notifyEvent(com::sun::star::document::EventObject const&) 
(this=0x55b8c2b54840, rEvent=...) at 
/home/julien/lo/libreoffice/sc/source/ui/vba/vbaeventshelper.cxx:605
    0x00007f9ef464bd3c in (anonymous 
namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XEventListener,
 
com::sun::star::document::EventObject>::operator()(com::sun::star::uno::Reference<com::sun::star::document::XEventListener>
 const&) const (this=0x7ffc5044dfc0, listener=uno::Reference to 
(ScVbaEventsHelper *) 0x55b8c2b54870) at 
/home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3293
    0x00007f9ef463b8aa in 
comphelper::OInterfaceContainerHelper3<com::sun::star::document::XEventListener>::forEach<(anonymous
 
namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XEventListener,
 com::sun::star::document::EventObject> >((anonymous 
namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XEventListener,
 com::sun::star::document::EventObject> const&)
    (this=0x55b8c2735c18, func=...) at 
include/comphelper/interfacecontainer3.hxx:279
    0x00007f9ef463b010 in SfxBaseModel::postEvent_Impl(rtl::OUString const&, 
com::sun::star::uno::Reference<com::sun::star::frame::XController2> const&, 
com::sun::star::uno::Any const&)
    (this=0x55b8c2308ae0, aName="OnUnload", xController=empty uno::Reference, 
supplement=uno::Any(void)) at 
/home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3338
    0x00007f9ef463a089 in SfxBaseModel::Notify(SfxBroadcaster&, SfxHint const&) 
(this=0x55b8c2308ae0, rBC=..., rHint=...) at 
/home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:2960
    
    See full bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=192546
    
    Regression from:
    
https://git.libreoffice.org/core/+/d2fccf0117a37f8aab8bb50ece419987f06af6b9%5E%21
    "cool#6893 improve listeners in SfxBaseModel"
    
    Change-Id: I372808dade20c47275ab599054d8e9572dc3da4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163356
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins
    (cherry picked from commit 6c6b580428bc527da9af82da743616787617b39b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163344
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 985af531358d..062c594f2c4f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2510,7 +2510,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const 
Reference< document::XEve
 {
     SfxModelGuard aGuard( *this );
 
-    m_pData->m_aEventListeners.removeInterface( aListener );
+    m_pData->m_aDocumentEventListeners1.removeInterface( aListener );
 }
 
 //  XShapeEventBroadcaster

Reply via email to