diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 09:55:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 12:57:25 +0000 |
commit | ccf0f7ef03bf98831a3e21b4b1327673a590b918 (patch) | |
tree | 3915012002ee7fb81085c4b0ec8e4e38f9b118c7 /extensions | |
parent | coverity#1187871 Unused pointer value (diff) | |
download | core-ccf0f7ef03bf98831a3e21b4b1327673a590b918.tar.gz core-ccf0f7ef03bf98831a3e21b4b1327673a590b918.zip |
coverity#704633 Dereference after null check
Change-Id: I4985249110da93ba67881dcd1c8cd1dc66ae08e2
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 631a35bd15a1..b0a3c0181402 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1196,11 +1196,12 @@ namespace pcr // So, we manually switch this to read-only. if ( xControl.is() && ( xControl->getControlType() == PropertyControlType::Unknown ) ) { - Edit* pControlWindowAsEdit = dynamic_cast< Edit* >( rLine.pLine->getControlWindow() ); - if ( pControlWindowAsEdit ) - pControlWindowAsEdit->SetReadOnly( sal_True ); + Window *pWindow = rLine.pLine->getControlWindow(); + Edit* pControlWindowAsEdit = dynamic_cast<Edit*>(pWindow); + if (pControlWindowAsEdit) + pControlWindowAsEdit->SetReadOnly(sal_True); else - pControlWindowAsEdit->Enable( false ); + pWindow->Enable(false); } } } |