[lldb] Host::ShellExpandArguments - fix error check for valid dictionary
Fix repeated check for a valid JSON parse and actually check the dictionary pointer Reported here: https://pvs-studio.com/en/blog/posts/cpp/1003/ (N40)
This commit is contained in:
parent
6fcaaf89fe
commit
93a5a03030
|
@ -245,7 +245,7 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dict_sp = data_sp->GetAsDictionary();
|
auto dict_sp = data_sp->GetAsDictionary();
|
||||||
if (!data_sp) {
|
if (!dict_sp) {
|
||||||
error.SetErrorString("invalid JSON");
|
error.SetErrorString("invalid JSON");
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue