nm-online: check return value of nm_client_new()

This commit is contained in:
Jiří Klimeš 2013-10-11 13:11:49 +02:00
parent 570b9b362d
commit 15ade8a0ca

View file

@ -143,9 +143,14 @@ main (int argc, char *argv[])
}
g_type_init ();
loop = g_main_loop_new (NULL, FALSE);
client = nm_client_new ();
if (!client) {
g_printerr (_("Error: Could not create NMClient object."));
return 2;
}
loop = g_main_loop_new (NULL, FALSE);
if (!nm_client_get_manager_running (client)) {
if (exit_no_nm)