diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-01 20:28:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-02 09:24:11 +0200 |
commit | 41590e7d1f8ee67c7d5c29c89a9b246c8c8f0f05 (patch) | |
tree | 8550293a2dc028b84799b4721b8b369eba97e6d8 /forms/source | |
parent | caf719c59c6dc8db2b6a0eab8d47760277f112a3 (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/FormComponent.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Grid.cxx | 2 | ||||
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/clipboarddispatcher.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/richtextimplcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/model.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/model_ui.cxx | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index a5ae6c07cec4..600d7c9a9c9e 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -541,7 +541,7 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< ,m_nTabIndex( FRM_DEFAULT_TABINDEX ) ,m_nClassId( FormComponentType::CONTROL ) { - DBG_ASSERT( _pOriginal, "OControlModel::OControlModel: invalid original!" ); + assert(_pOriginal && "OControlModel::OControlModel: invalid original!"); // copy members m_aName = _pOriginal->m_aName; diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 1290aa91af7f..724c5a4a240b 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -770,7 +770,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream { // first the service name for the underlying model OGridColumn* pCol = comphelper::getFromUnoTunnel<OGridColumn>(m_aItems[i]); - DBG_ASSERT(pCol != nullptr, "OGridControlModel::write : such items should never reach it into my container !"); + assert(pCol != nullptr && "OGridControlModel::write : such items should never reach it into my container !"); _rxOutStream << pCol->getModelName(); // then the object itself sal_Int32 nMark = xMark->createMark(); diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 90a918f5edcd..dba3d96ee405 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -768,7 +768,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper if ( !pElementMetaData ) { // not yet approved by the caller -> do ourself pElementMetaData = createElementMetaData(); - DBG_ASSERT( pElementMetaData, "OInterfaceContainer::implInsert: createElementMetaData returned nonsense!" ); + assert(pElementMetaData && "OInterfaceContainer::implInsert: createElementMetaData returned nonsense!"); // ensure that the meta data structure will be deleted later on aAutoDeleteMetaData.reset( pElementMetaData ); diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index 70313edb33c7..e11bd99c4595 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -155,7 +155,7 @@ namespace frm IMPL_LINK( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper, void ) { - OSL_ENSURE( _pDataHelper, "OPasteClipboardDispatcher::OnClipboardChanged: ooops!" ); + assert(_pDataHelper && "OPasteClipboardDispatcher::OnClipboardChanged: ooops!"); m_bPastePossible = _pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || _pDataHelper->HasFormat( SotClipboardFormatId::RTF ) || _pDataHelper->HasFormat( SotClipboardFormatId::RICHTEXT ); diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index eeb9fba98d33..ba99314fd6ba 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -52,7 +52,7 @@ namespace frm ,m_bHasEverBeenShown ( false ) { OSL_ENSURE( m_pAntiImpl, "RichTextControlImpl::RichTextControlImpl: invalid window!" ); - OSL_ENSURE( m_pEngine, "RichTextControlImpl::RichTextControlImpl: invalid edit engine! This will *definitely* crash!" ); + assert(m_pEngine && "RichTextControlImpl::RichTextControlImpl: invalid edit engine! This will *definitely* crash!"); m_pViewport = VclPtr<RichTextViewPort>::Create( m_pAntiImpl ); m_pViewport->setAttributeInvalidationHandler( LINK( this, RichTextControlImpl, OnInvalidateAllAttributes ) ); diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index bbb460f18267..fbb0de1ebdd8 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -359,7 +359,7 @@ bool Model::isValid() const for( sal_Int32 i = 0; bValid && i < nCount; i++ ) { Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); - OSL_ENSURE( pBind != nullptr, "binding?" ); + assert(pBind != nullptr && "binding?"); bValid = pBind->isValid(); } return bValid; diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 5d56e8b3baa0..ad1da7a3ac3f 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -680,7 +680,7 @@ css::uno::Reference< ::css::beans::XPropertySet > Model::getBindingForNode( cons Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( n ) ); - OSL_ENSURE( pBinding != nullptr, "no binding?" ); + assert(pBinding != nullptr && "no binding?"); Reference<XNodeList> xNodeList = pBinding->getXNodeList(); sal_Int32 nNodes = xNodeList.is() ? xNodeList->getLength() : 0; |