diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-19 11:45:02 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-19 11:45:02 +0100 |
commit | ee11939027272d48e9e0691dd47993c250edeb27 (patch) | |
tree | 6d1351ce76cfe6bd1432e3a7a456fae798625974 | |
parent | dba33f: make compile with debug=1 (diff) | |
download | core-ee11939027272d48e9e0691dd47993c250edeb27.tar.gz core-ee11939027272d48e9e0691dd47993c250edeb27.zip |
dba33f: #i109403#: ControlHolder::invalidate: allowed to have no Window, *if* we have no peer
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 81d19df1e2fa..dc5770b37592 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -302,10 +302,14 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void ControlHolder::invalidate() const { - Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() ); - OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); - if ( pWindow ) - pWindow->Invalidate(); + Reference< XWindowPeer > xPeer( m_xControl->getPeer() ); + if ( xPeer.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xPeer ); + OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); + if ( pWindow ) + pWindow->Invalidate(); + } } //-------------------------------------------------------------------- |