static-delta: Fix probably not actually possible NULL deref

Flagged by `gcc -fanalyzer`.  I didn't study this really deeply
but I think it's not actually reachable.  Anyways, let's catch
it on general principle.
This commit is contained in:
Colin Walters 2021-10-08 09:07:41 -04:00
parent 3159e04980
commit f355482e1f
1 changed files with 1 additions and 1 deletions

View File

@ -669,7 +669,7 @@ ostree_builtin_static_delta (int argc, char **argv, OstreeCommandInvocation *inv
return TRUE; /* Note early return */
}
if (!command->fn)
if (!command || !command->fn)
{
static_delta_usage (argv, TRUE);
return glnx_throw (error, "Unknown \"static-delta\" subcommand '%s'", cmdname);