mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 09:59:48 +01:00
oops
This commit is contained in:
parent
eb9cdea176
commit
0d38ce0e9e
1 changed files with 3 additions and 2 deletions
|
@ -92,7 +92,7 @@ void CConfigValue::defaultFrom(SConfigDefaultValue& ref) {
|
|||
break;
|
||||
}
|
||||
case CONFIGDATATYPE_STR: {
|
||||
if (!m_pData)
|
||||
if (m_pData)
|
||||
free(m_pData);
|
||||
std::string str = std::any_cast<std::string>(ref.data);
|
||||
m_pData = calloc(1, str.length() + 1);
|
||||
|
@ -131,6 +131,7 @@ void CConfigValue::setFrom(std::any value) {
|
|||
break;
|
||||
}
|
||||
case CONFIGDATATYPE_STR: {
|
||||
if (m_pData)
|
||||
free(m_pData);
|
||||
std::string str = std::any_cast<std::string>(value);
|
||||
m_pData = calloc(1, str.length() + 1);
|
||||
|
|
Loading…
Reference in a new issue