From 0e18800f3955718dbf47a162810495e7ad4f477b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 12 Nov 2017 20:50:45 +0100 Subject: [PATCH] ws2_32/tests: Avoid crashes on flaky/non-present network. Signed-off-by: Marcus Meissner Signed-off-by: Alexandre Julliard --- dlls/ws2_32/tests/sock.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 179ace4c6ae..4cbc1e9d050 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7657,10 +7657,13 @@ static void test_GetAddrInfoExW(void) ok(overlapped.Internal == ERROR_SUCCESS, "overlapped.Internal = %lx\n", overlapped.Internal); ok(overlapped.Pointer == &result, "overlapped.Pointer != &result\n"); ok(result != NULL, "result == NULL\n"); - ok(!result->ai_blob, "ai_blob != NULL\n"); - ok(!result->ai_bloblen, "ai_bloblen != 0\n"); - ok(!result->ai_provider, "ai_provider = %s\n", wine_dbgstr_guid(result->ai_provider)); - pFreeAddrInfoExW(result); + if (result != NULL) + { + ok(!result->ai_blob, "ai_blob != NULL\n"); + ok(!result->ai_bloblen, "ai_bloblen != 0\n"); + ok(!result->ai_provider, "ai_provider = %s\n", wine_dbgstr_guid(result->ai_provider)); + pFreeAddrInfoExW(result); + } result = (void*)0xdeadbeef; memset(&overlapped, 0xcc, sizeof(overlapped));