summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/win32/misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/win32/misc.c b/misc/win32/misc.c
index 4bed39e12..5ded3fed9 100644
--- a/misc/win32/misc.c
+++ b/misc/win32/misc.c
@@ -29,7 +29,9 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level)
{
static OSVERSIONINFO oslev;
oslev.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&oslev);
+ if (!GetVersionEx(&oslev)) {
+ return apr_get_os_error();
+ }
if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT)
{