summaryrefslogtreecommitdiffstats
path: root/embeddedobj
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 06562ac39682..aae1180f8d8b 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1771,7 +1771,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
- if ( !m_bIsLink )
+ if (!m_bIsLink || m_nObjectState == -1)
{
// it must be a linked initialized object
throw embed::WrongStateException(
@@ -1791,14 +1791,6 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
static_cast< ::cppu::OWeakObject* >(this),
2 );
- if ( !m_bIsLink || m_nObjectState == -1 )
- {
- // it must be a linked initialized object
- throw embed::WrongStateException(
- "The object is not a valid linked object!",
- static_cast< ::cppu::OWeakObject* >(this) );
- }
-
if ( m_bWaitSaveCompleted )
throw embed::WrongStateException(
"The object waits for saveCompleted() call!",