dbaccess/source/ui/relationdesign/RTableConnection.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 3079e0c1ff781c77b0b279dea9ec97a5a24e5b92 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed May 8 09:37:59 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed May 8 13:42:22 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 (cherry picked from commit 0b97bfa88ffebf31778f0f68e883e046822cd264) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167313 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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