summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-08 09:37:59 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-05-08 13:42:22 +0200
commit3079e0c1ff781c77b0b279dea9ec97a5a24e5b92 (patch)
treec5cf9a6ce8425342cbcb555b51da4f594cb8731b
parent0aef29521b824e61b81bb6be1079b8ddd77e39a9 (diff)
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.mcnamara@collabora.com> Tested-by: Jenkins (cherry picked from commit 0b97bfa88ffebf31778f0f68e883e046822cd264) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167313 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.cxx2
1 files changed, 1 insertions, 1 deletions
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