summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-02 10:55:21 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-04 08:50:21 +0200
commit10072ea419ade05b61fd42e14f6be7d201134280 (patch)
treea744e1e9600e6b52be814786ef11197da0ec0409
parentb4c0a0ea0102d4157572b4f4302324533c0667fb (diff)
Fix crash when no key bindings are available
Change-Id: I89693a01bd3e89f6d4000901c01accf88b453691 Reviewed-on: https://gerrit.libreoffice.org/61232 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--vcl/qt5/Qt5AccessibleWidget.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index ffbca8d0338e..0e783dcb3808 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -684,6 +684,9 @@ QStringList Qt5AccessibleWidget::keyBindingsForAction(const QString& actionName)
Reference<XAccessibleKeyBinding> xKeyBinding
= xAccessibleAction->getAccessibleActionKeyBinding(index);
+ if (!xKeyBinding.is())
+ return keyBindings;
+
int count = xKeyBinding->getAccessibleKeyBindingCount();
for (int i = 0; i < count; i++)
{