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 committed 2021-10-13 17:13:14 -04:00
1 parent 3159e04980
commit f355482e1f
1 file changed
+1 -1
+1 -1
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);