Added copy constructor to LocalizedString so that a LocalizedString created by copying another does not crash in the destructor.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -13,6 +13,7 @@ class LocalizedString
|
||||
{
|
||||
public:
|
||||
LocalizedString( const RString& sGroup = "", const RString& sName = "" );
|
||||
LocalizedString(LocalizedString const& other);
|
||||
~LocalizedString();
|
||||
void Load( const RString& sGroup, const RString& sName );
|
||||
operator const RString &() const { return GetValue(); }
|
||||
|
||||
Reference in New Issue
Block a user