summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-09-16 16:05:30 +0200
committerCaolán McNamara <caolanm@redhat.com>2022-09-17 13:08:00 +0200
commit1f1342f30abaa39366b8f7f359ea2e3aa2e1d962 (patch)
treeff2403c45a6fee53b5cedccca79f8c9d6e80521a
parenttdf#136928 Use dialog text color for signs in "Tabs" dialog (diff)
downloadcore-1f1342f30abaa39366b8f7f359ea2e3aa2e1d962.tar.gz
core-1f1342f30abaa39366b8f7f359ea2e3aa2e1d962.zip
tdf#150974 Writer crashes when starting with WollMux installed
regression from commit b2aa646ef09dc8434d3ca8a5bba53a8d8ff3f910 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Dec 15 11:43:32 2021 +0000 use more OInterfaceContainerHelper3 in toolkit Change-Id: I26532ea79b7c5f750b4bf693881cbf41aeb82266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139986 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--toolkit/source/controls/unocontrols.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index e728103d0b28..260fc13012ff 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -269,11 +269,23 @@ void UnoEditControl::textChanged(const awt::TextEvent& e)
void UnoEditControl::addTextListener(const uno::Reference< awt::XTextListener > & l)
{
+ // tdf#150974 some extensions pass null
+ if (!l)
+ {
+ SAL_WARN("toolkit", "null XTextListener");
+ return;
+ }
maTextListeners.addInterface( l );
}
void UnoEditControl::removeTextListener(const uno::Reference< awt::XTextListener > & l)
{
+ // tdf#150974 some extensions pass null
+ if (!l)
+ {
+ SAL_WARN("toolkit", "null XTextListener");
+ return;
+ }
maTextListeners.removeInterface( l );
}
@@ -766,6 +778,13 @@ void UnoButtonControl::createPeer( const uno::Reference< awt::XToolkit > & rxToo
void UnoButtonControl::addActionListener(const uno::Reference< awt::XActionListener > & l)
{
+ // tdf#150974 some extensions pass null
+ if (!l)
+ {
+ SAL_WARN("toolkit", "null XActionListener");
+ return;
+ }
+
maActionListeners.addInterface( l );
if( getPeer().is() && maActionListeners.getLength() == 1 )
{
@@ -776,6 +795,13 @@ void UnoButtonControl::addActionListener(const uno::Reference< awt::XActionListe
void UnoButtonControl::removeActionListener(const uno::Reference< awt::XActionListener > & l)
{
+ // tdf#150974 some extensions pass null
+ if (!l)
+ {
+ SAL_WARN("toolkit", "null XActionListener");
+ return;
+ }
+
if( getPeer().is() && maActionListeners.getLength() == 1 )
{
uno::Reference < awt::XButton > xButton( getPeer(), uno::UNO_QUERY );