When exit from ConnMan, __connman_connection_cleanup() is called
before __connman_service_cleanup() which then calls update_order().
__connman_connection_cleanup() sets gateway_hash as NULL, so update_order()
will access NULL hash and causes GLib-CRITICAL abort
struct gateway_data *active_gateway, *default_gateway;
gboolean updated = FALSE;
+ if (gateway_hash == NULL)
+ return updated;
+
update_order();
active_gateway = find_active_gateway();