diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-02-18 20:39:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-02-18 21:49:14 +0100 |
commit | cd0fca5860cb42660a04eafb22893fdff0110b7f (patch) | |
tree | b25419af041f73bb924f0c7291d3a87a175d903d /sfx2/source | |
parent | e9d1f939bd0d8ff0189146176c709e35c3de6630 (diff) |
Revert too aggressive clean-up
This part of the code was not meant to be removed by
2ff77d088424bc3f5a8e38ef5c1aa3457d102eca "SfxGlobalEvents_Impl::m_xEvents is
never changed and never null".
Change-Id: I0947457b9b5b6cd79f9ea0aea63265d656787f47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88984
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/notify/globalevents.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx index c1a1f674760c..71c1128444ea 100644 --- a/sfx2/source/notify/globalevents.cxx +++ b/sfx2/source/notify/globalevents.cxx @@ -355,7 +355,9 @@ void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const document::D { try { - uno::Any aAny = m_xEvents->getByName(aEvent.EventName); + uno::Any aAny; + if ( m_xEvents->hasByName( aEvent.EventName ) ) + aAny = m_xEvents->getByName(aEvent.EventName); SfxEvents_Impl::Execute(aAny, aEvent, nullptr); } catch ( uno::RuntimeException const & ) |