application: Use printerr for runtime errors

g_critical can be fatal (with --g-fatal-warnings, or some env var set),
so don't use it to print out runtime errors.

Bug #676761.
This commit is contained in:
Christian Persch 2012-05-24 19:18:44 +02:00 committed by Matthias Clasen
parent e45372895d
commit bd8fb391aa

View File

@ -480,7 +480,7 @@ g_application_real_local_command_line (GApplication *application,
if (!g_application_register (application, NULL, &error))
{
g_critical ("%s", error->message);
g_printerr ("Failed to register: %s\n", error->message);
g_error_free (error);
*exit_status = 1;
return TRUE;
@ -1596,7 +1596,7 @@ g_application_run (GApplication *application,
if (!g_application_register (application, NULL, &error))
{
g_printerr ("%s", error->message);
g_printerr ("Failed to register: %s\n", error->message);
g_error_free (error);
return 1;
}