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 authored and Colin Walters committed 2012-05-06 13:56:57 -04:00
1 parent 4a03176489
commit 07f67f3baf
1 file changed
+1 -1
+1 -1
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++;
}