ostree: avoid a segfault

When running ostree --repo=/ostree/repo without further arguments,
we end up calling strcmp with one argument being NULL.
This commit is contained in:
Matthias Clasen 2012-05-05 20:59:23 -04:00 committed by Colin Walters
parent 4a03176489
commit 07f67f3baf

View File

@ -140,7 +140,7 @@ ostree_main (int argc,
builtin = builtins;
while (builtin->name)
{
if (strcmp (cmd, builtin->name) == 0)
if (g_strcmp0 (cmd, builtin->name) == 0)
break;
builtin++;
}