fix: transmission-remote -l regression (#5960)

This commit is contained in:
Charles Kerr 2023-09-01 17:23:44 -05:00 committed by GitHub
parent e39045cf69
commit 14b324fc9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -169,11 +169,17 @@ bool tr_variantGetInt(tr_variant const* const var, int64_t* setme)
switch (variant_index(var))
{
case tr_variant::IntIndex:
*setme = *var->get_if<tr_variant::IntIndex>();
if (setme != nullptr)
{
*setme = *var->get_if<tr_variant::IntIndex>();
}
return true;
case tr_variant::BoolIndex:
*setme = *var->get_if<tr_variant::BoolIndex>() ? 1 : 0;
if (setme != nullptr)
{
*setme = *var->get_if<tr_variant::BoolIndex>() ? 1 : 0;
}
return true;
default: