diff options
Diffstat (limited to 'security/manager/ssl/TransportSecurityInfo.cpp')
-rw-r--r-- | security/manager/ssl/TransportSecurityInfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp index 0e2238ad0..3c7023302 100644 --- a/security/manager/ssl/TransportSecurityInfo.cpp +++ b/security/manager/ssl/TransportSecurityInfo.cpp @@ -429,7 +429,12 @@ TransportSecurityInfo::Read(nsIObjectInputStream* stream) if (NS_FAILED(rv)) { return rv; } - mSSLStatus = BitwiseCast<nsSSLStatus*, nsISupports*>(supports.get()); + nsCOMPtr<nsISSLStatus> castGuard(do_QueryInterface(supports)); + if (castGuard) { + mSSLStatus = BitwiseCast<nsSSLStatus*, nsISSLStatus*>(castGuard.get()); + } else { + mSSLStatus = nullptr; + } nsCOMPtr<nsISupports> failedCertChainSupports; rv = NS_ReadOptionalObject(stream, true, getter_AddRefs(failedCertChainSupports)); |