diff --git a/gio/tests/socket.c b/gio/tests/socket.c index f1651972f..e095d0195 100644 --- a/gio/tests/socket.c +++ b/gio/tests/socket.c @@ -140,7 +140,11 @@ create_server_full (GSocketFamily family, { g_socket_set_option (data->server, IPPROTO_IPV6, IPV6_V6ONLY, FALSE, NULL); if (!g_socket_speaks_ipv4 (data->server)) - goto error; + { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "IPv6-only server cannot speak IPv4"); + goto error; + } } #endif @@ -342,6 +346,7 @@ test_ip_async (GSocketFamily family) g_clear_error (&error); return; } + g_assert_nonnull (data); addr = g_socket_get_local_address (data->server, &error); g_assert_no_error (error);