summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-29 19:20:43 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-25 00:20:08 +0200
commit1518416ac6a692c2234dfa3cb4b98a382ebe65cc (patch)
treeda51331f6ef3d5f673e2a5bd80cd83cdaf75cf22
parent9d3fb278999edb233eb1c2612412a06cd150e396 (diff)
lp#746375: soffice.bin crashed with SIGSEGV in uno_type_sequence_construct()
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index f7e849e44e87..16ff41058bb7 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -66,7 +66,14 @@
using namespace ::com::sun::star;
-static uno::WeakReference< accessibility::XAccessible > xNextFocusObject;
+namespace
+{
+ struct theNextFocusObject :
+ public rtl::Static< uno::WeakReference< accessibility::XAccessible >, theNextFocusObject>
+ {
+ };
+}
+
static guint focus_notify_handler = 0;
/*****************************************************************************/
@@ -80,7 +87,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
focus_notify_handler = 0;
- uno::Reference< accessibility::XAccessible > xAccessible = xNextFocusObject;
+ uno::Reference< accessibility::XAccessible > xAccessible = theNextFocusObject::get();
if( xAccessible.get() == reinterpret_cast < accessibility::XAccessible * > (data) )
{
AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
@@ -135,7 +142,7 @@ atk_wrapper_focus_tracker_notify_when_idle( const uno::Reference< accessibility:
if( focus_notify_handler )
g_source_remove(focus_notify_handler);
- xNextFocusObject = xAccessible;
+ theNextFocusObject::get() = xAccessible;
focus_notify_handler = g_idle_add (atk_wrapper_focus_idle_handler, xAccessible.get());
}