diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-05 12:35:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-05 20:34:33 +0100 |
commit | a9d67869402c8dc2ed34ba59fec5a72ea821a4e0 (patch) | |
tree | 4b4cb551f539626694fec119d62826ee8916d7e3 /dbaccess | |
parent | fa84cdbf0681c5241c0dd9d2b70fd39c6de9c946 (diff) |
coverity#704617 Explicit null dereferenced
Change-Id: I4ccad4c6baad8e3db3c2868ea5baecaff9f5c75e
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 11d6871e48fc..307b56d297c4 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -169,11 +169,13 @@ using namespace ::com::sun::star; if (pCollectionItem) pCollection = pCollectionItem->getCollection(); OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !"); - - OUString sUrl = pCollection->getPrefix( OUString("sdbc:address:ldap:")); - sUrl += m_aETHostServer.GetText(); - _rSet.Put(SfxStringItem(DSID_CONNECTURL, sUrl)); - bChangedSomething = sal_True; + if (pCollection) + { + OUString sUrl = pCollection->getPrefix( OUString("sdbc:address:ldap:")); + sUrl += m_aETHostServer.GetText(); + _rSet.Put(SfxStringItem(DSID_CONNECTURL, sUrl)); + bChangedSomething = sal_True; + } } fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething); |