Added copy constructor to LocalizedString so that a LocalizedString created by copying another does not crash in the destructor.

This commit is contained in:
Kyzentun Keeslala
2015-12-27 06:45:49 -07:00
parent b8929e7c24
commit 55bd774a4c
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -45,6 +45,17 @@ LocalizedString::LocalizedString( const RString& sGroup, const RString& sName )
CreateImpl();
}
LocalizedString::LocalizedString(LocalizedString const& other)
{
m_Subscribers.Subscribe(this);
m_sGroup = other.m_sGroup;
m_sName = other.m_sName;
m_pImpl = NULL;
CreateImpl();
}
LocalizedString::~LocalizedString()
{
m_Subscribers.Unsubscribe( this );