diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index 765f230b57..e2e4b157ad 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -768,12 +768,11 @@ _post_check (GtkCupsRequest *request) } else if (http_status == HTTP_ERROR) { + int error = httpError (request->http); #ifdef G_OS_WIN32 - if (request->http->error != WSAENETDOWN && - request->http->error != WSAENETUNREACH) + if (error != WSAENETDOWN && error != WSAENETUNREACH) #else - if (request->http->error != ENETDOWN && - request->http->error != ENETUNREACH) + if (error != ENETDOWN && error != ENETUNREACH) #endif /* G_OS_WIN32 */ { request->attempts++;