fix: crash in printTorrentList() (#6819)

* Fix crash in printTorrentList

* code review: accept nullptr setme
This commit is contained in:
Cœur 2024-05-06 04:26:41 +08:00 committed by GitHub
parent fcb40c2f22
commit 6c1cee5f79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,10 @@ template<typename T>
{
if (auto val = var->value_if<T>())
{
*setme = *val;
if (setme)
{
*setme = *val;
}
return true;
}
}