diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-18 09:15:23 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-04-18 20:15:41 +0200 |
commit | f2252864812adf7c91681a11ddb817a28376d406 (patch) | |
tree | 6d77e84cf37e0ccfe51efd3c8ae18a2a4d79c2a9 | |
parent | 3e1304da32ace76b51d869b641676257d3ebd875 (diff) |
catch exception like text_wrapper_get_caret_offset does
Change-Id: I7d681a5cd58af60005eefa9969ec975d5cfc5580
(cherry picked from commit 0d2a607a849e3f1b51092c7d96bc5529420cfab2)
Reviewed-on: https://gerrit.libreoffice.org/36635
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 615942e388c6dfa48d1edbf645fe6b0dd67cfa40)
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 708417722788..6c3dca52a557 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -91,7 +91,14 @@ atk_wrapper_focus_idle_handler (gpointer data) wrapper_obj->mpText.set(wrapper_obj->mpContext, css::uno::UNO_QUERY); if ( wrapper_obj->mpText.is() ) { - gint caretPos = wrapper_obj->mpText->getCaretPosition(); + gint caretPos = -1; + + try { + caretPos = wrapper_obj->mpText->getCaretPosition(); + } + catch(const uno::Exception&) { + g_warning( "Exception in getCaretPosition()" ); + } if ( caretPos != -1 ) { |