diff options
Diffstat (limited to 'vcl/unx/gtk/a11y/atkimage.cxx')
-rw-r--r-- | vcl/unx/gtk/a11y/atkimage.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx index 873cddddbcd2..c1652a4ee582 100644 --- a/vcl/unx/gtk/a11y/atkimage.cxx +++ b/vcl/unx/gtk/a11y/atkimage.cxx @@ -39,11 +39,14 @@ static css::uno::Reference<css::accessibility::XAccessibleImage> getImage( AtkImage *pImage ) throw (uno::RuntimeException) { AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pImage ); - if (pWrap) + if( pWrap ) { - uno::Reference<accessibility::XAccessibleImage> xAI( - pWrap->mpContext.get(), uno::UNO_QUERY); - return xAI; + if( !pWrap->mpImage.is() ) + { + pWrap->mpImage.set(pWrap->mpContext, css::uno::UNO_QUERY); + } + + return pWrap->mpImage; } return css::uno::Reference<css::accessibility::XAccessibleImage>(); |