Index: unx/gtk/a11y/atktext.cxx =================================================================== RCS file: /cvs/gsl/vcl/unx/gtk/a11y/atktext.cxx,v retrieving revision 1.3.30.2 diff -u -r1.3.30.2 atktext.cxx --- unx/gtk/a11y/atktext.cxx 6 Oct 2006 09:22:37 -0000 1.3.30.2 +++ unx/gtk/a11y/atktext.cxx 23 Oct 2006 12:50:52 -0000 @@ -184,8 +184,15 @@ if( !pWrap->mpTextAttributes && pWrap->mpContext ) { uno::Any any = pWrap->mpContext->queryInterface( accessibility::XAccessibleTextAttributes::static_type(NULL) ); - pWrap->mpTextAttributes = reinterpret_cast< accessibility::XAccessibleTextAttributes * > (any.pReserved); - pWrap->mpTextAttributes->acquire(); + /* Since this not a dedicated interface in Atk and thus has not + * been queried during wrapper initialization, we need to check + * the return value here. + */ + if( any.hasValue() ) + { + pWrap->mpTextAttributes = reinterpret_cast< accessibility::XAccessibleTextAttributes * > (any.pReserved); + pWrap->mpTextAttributes->acquire(); + } } return pWrap->mpTextAttributes;