diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-08 09:39:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-08 15:11:42 +0200 |
commit | a551290fc46d5f91b89615700c88b863a403bc7a (patch) | |
tree | e970b942c3fdcdc0033f0b29b9ef633b3e0b9d56 /dbaccess/source/ui/querydesign | |
parent | 4fc4e24fb0ac549b7684aac8e020253c0cc76603 (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ia64d863baa72a2d32a8bee40968af4f6aacd88bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167332
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'dbaccess/source/ui/querydesign')
5 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index ce66828facb5..a42d65508008 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -87,8 +87,8 @@ void OQueryTableConnectionData::InitFromDrag(const OTableFieldDescRef& rDragLeft // convert Information in rDrag into parameters for the base class init OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(rDragLeft->GetTabWindow()); OQueryTableWindow* pDestWin = static_cast<OQueryTableWindow*>(rDragRight->GetTabWindow()); - OSL_ENSURE(pSourceWin,"NO Source window found!"); - OSL_ENSURE(pDestWin,"NO Dest window found!"); + assert(pSourceWin && "NO Source window found!"); + assert(pDestWin && "NO Dest window found!"); m_pReferencingTable = pSourceWin->GetData(); m_pReferencedTable = pDestWin->GetData(); diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index 93cbf6026d4c..ed490860c3ea 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -110,7 +110,7 @@ void OQueryTableWindow::OnEntryDoubleClicked(weld::TreeIter& rEntry) weld::TreeView& rTreeView = m_xListBox->get_widget(); OTableFieldInfo* pInf = weld::fromId<OTableFieldInfo*>(rTreeView.get_id(rEntry)); - OSL_ENSURE(pInf != nullptr, "OQueryTableWindow::OnEntryDoubleClicked : field doesn't have FieldInfo !"); + assert(pInf && "OQueryTableWindow::OnEntryDoubleClicked : field doesn't have FieldInfo !"); // build up DragInfo OTableFieldDescRef aInfo = new OTableFieldDesc(GetTableName(), rTreeView.get_text(rEntry)); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 108d36fd5729..47c7a996be94 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -309,7 +309,7 @@ namespace const OQueryTableWindow* _pEntryTabTo, OUString& _rJoin ) { - OSL_ENSURE(_pEntryConn,"TableConnection can not be null!"); + assert(_pEntryConn && "TableConnection can not be null!"); OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pEntryConn->GetData().get()); if ( !(pData->GetJoinType() != INNER_JOIN && _pEntryTabTo->ExistsAVisitedConn()) ) diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 663d3a9e65a6..f48dc17c7a3a 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -496,7 +496,7 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& if ( pTabWinTmp->GetData()->isQuery() ) continue; - OSL_ENSURE(pTabWinTmp,"TableWindow is null!"); + assert(pTabWinTmp && "TableWindow is null!"); Reference< XPropertySet > xFKKey = getKeyReferencedTo( pTabWinTmp->GetData()->getKeys(), pNewTabWin->GetComposedName() ); if ( !xFKKey.is() ) continue; @@ -751,7 +751,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc { VclPtr<OTableConnection> xTmpEntry = *aIter2; OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(xTmpEntry.get()); - OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!"); + assert(pTmpEntry && "OQueryTableConnection is null!"); if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() || pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() ) { diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 0e3ad0573c7f..2990a010298b 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -64,7 +64,7 @@ IMPL_LINK(OTableWindowTitle, MousePressHdl, const MouseEvent&, rEvt, bool) m_pTabWin->SetSizePixel(aSize); OJoinTableView* pView = m_pTabWin->getTableView(); - OSL_ENSURE(pView,"No OJoinTableView!"); + assert(pView && "No OJoinTableView!"); for (auto& conn : pView->getTableConnections()) conn->RecalcLines(); |