diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-28 12:47:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-28 12:47:45 +0100 |
commit | 7e0b36d6102f5e285296cd8e0dc6961b5c73c7cb (patch) | |
tree | 878272039b9c07f266e26c4459d9c20ed6cd2224 /indra | |
parent | 58fb834a6ea3698ec6d89cb07e543d088dc69c00 (diff) |
CID-442
Checker: FORWARD_NULL
Function: LLBasicCertificateVector::insert(LLCertificateVector::iterator, LLPointer<LLCertificate>)
File: /indra/newview/llsechandler_basic.cpp
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llsechandler_basic.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index edf5ce9b60..c4c13ccdca 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -541,7 +541,7 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa // Insert a certificate into the store. If the certificate already // exists in the store, nothing is done. void LLBasicCertificateVector::insert(iterator _iter, - LLPointer<LLCertificate> cert) + LLPointer<LLCertificate> cert) { LLSD cert_info = cert->getLLSD(); if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST)) @@ -551,7 +551,11 @@ void LLBasicCertificateVector::insert(iterator _iter, if(find(existing_cert_info) == end()) { BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get()); - mCerts.insert(basic_iter->mIter, cert); + llassert(basic_iter); + if (basic_iter) + { + mCerts.insert(basic_iter->mIter, cert); + } } } } |