Issues with pre-shared credentials after being moved to heap fixed

This commit is contained in:
2016-08-05 16:28:21 +02:00
parent 42459ff16a
commit b0323d894a
2 changed files with 3 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ eap::config_method_with_cred::config_method_with_cred(_In_ module *mod) :
eap::config_method_with_cred::config_method_with_cred(_In_ const config_method_with_cred &other) :
m_allow_save(other.m_allow_save),
m_use_preshared(other.m_use_preshared),
m_preshared((credentials*)other.m_preshared->clone()),
m_preshared(other.m_preshared ? (credentials*)other.m_preshared->clone() : nullptr),
config_method(other)
{
}
@@ -174,7 +174,7 @@ eap::config_method_with_cred& eap::config_method_with_cred::operator=(_In_ const
(config_method&)*this = other;
m_allow_save = other.m_allow_save;
m_use_preshared = other.m_use_preshared;
m_preshared.reset((credentials*)other.m_preshared->clone());
m_preshared.reset(other.m_preshared ? (credentials*)other.m_preshared->clone() : nullptr);
}
return *this;