diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-08 09:37:59 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-08 13:42:22 +0200 |
commit | 3079e0c1ff781c77b0b279dea9ec97a5a24e5b92 (patch) | |
tree | c5cf9a6ce8425342cbcb555b51da4f594cb8731b | |
parent | 0aef29521b824e61b81bb6be1079b8ddd77e39a9 (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.cxx | 2 |
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 |