summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-08 09:37:59 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-08 12:18:58 +0200
commit0b97bfa88ffebf31778f0f68e883e046822cd264 (patch)
treeefcdafd508da5e526218ffbab6f676e8b3d18f41 /dbaccess/source/ui
parente5aa87aeeb66a8f8068b41275d23c491f2dbd0f2 (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
Diffstat (limited to 'dbaccess/source/ui')
-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