diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-21 17:43:22 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-21 20:36:28 +0200 |
commit | d6d5a22b43f8610f67a4b5924d7d12a82cbdd2c9 (patch) | |
tree | 8dd5b8c3880d919367315717f6783af84de74a16 /sw | |
parent | bbc1fc161d1f6aeb476970aa04534bd5480e757c (diff) |
sw: assert that SwField::m_pType is not null
Change-Id: Ifb59810b11db05f4fbbd815ff00efc70cfac03af
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/fldbas.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index f2132be00442..f2d34adff125 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -198,7 +198,7 @@ SwField::SwField( , m_nFormat( nFormat ) , m_pType( pType ) { - OSL_ENSURE( pType, "SwField: no SwFieldType" ); + assert(m_pType); } SwField::~SwField() @@ -210,7 +210,7 @@ SwField::~SwField() #ifdef DBG_UTIL sal_uInt16 SwField::Which() const { - OSL_ENSURE(m_pType, "SwField: No FieldType"); + assert(m_pType); return m_pType->Which(); } #endif @@ -346,8 +346,7 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) */ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType ) { - OSL_ENSURE( pNewType && pNewType->Which() == m_pType->Which(), - "no or different type" ); + assert(pNewType && pNewType->Which() == m_pType->Which()); SwFieldType* pOld = m_pType; m_pType = pNewType; |