dbaccess/source/ui/relationdesign/RTableConnection.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 0b97bfa88ffebf31778f0f68e883e046822cd264 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed May 8 09:37:59 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed May 8 12:18:58 2024 +0200 return early on empty ORelationTableConnectionData* we test for pData existing, but it it doesn't then we continue and will typically dereference it, so test looks inverted Change-Id: Iddcab25d5620942bb617bd1e9985322f5e497839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167331 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx index ba60ae54661b..4b8086f5111f 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx @@ -51,7 +51,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const to { OTableConnection::Draw(rRenderContext, rRect); ORelationTableConnectionData* pData = static_cast< ORelationTableConnectionData* >(GetData().get()); - if (pData && (pData->GetCardinality() == Cardinality::Undefined)) + if (!pData || pData->GetCardinality() == Cardinality::Undefined) return; // search lines for top line