diff options
-rw-r--r-- | vcl/source/window/accessibility.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 3d81a1e82edc..4ee4b07ea89d 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -139,7 +139,9 @@ css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible( void Window::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& x ) { - assert(mpWindowImpl); + if (!mpWindowImpl) + return; + mpWindowImpl->mxAccessible = x; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 83a3bba5109e..a17a7e3a214a 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3125,7 +3125,8 @@ const OUString& Window::GetHelpText() const void Window::SetWindowPeer( Reference< css::awt::XWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow ) { - assert(mpWindowImpl); + if (!mpWindowImpl) + return; // be safe against re-entrance: first clear the old ref, then assign the new one mpWindowImpl->mxWindowPeer.clear(); |