mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 19:58:49 -05:00
Fix crash when setting variable to invalid environment variable
This commit is contained in:
@@ -311,7 +311,10 @@ bool MacroActionVariable::PerformAction()
|
||||
return true;
|
||||
}
|
||||
case Type::ENV_VARIABLE: {
|
||||
var->SetValue(std::getenv(_envVariableName.c_str()));
|
||||
auto value = std::getenv(_envVariableName.c_str());
|
||||
if (value) {
|
||||
var->SetValue(value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case Type::SCENE_ITEM_COUNT: {
|
||||
|
||||
Reference in New Issue
Block a user