diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-08-20 18:32:09 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-08-20 18:32:09 +0000 |
commit | 9768ce07c1e593b9040866468895294b7120f4d3 (patch) | |
tree | 66ffe2812f44a2514c357cf73fca5b482250c40e /misc/win32 | |
parent | cbe41acd892e1788ad372bbf6ee38e0a49c9b4c6 (diff) | |
download | libapr-9768ce07c1e593b9040866468895294b7120f4d3.tar.gz |
Fix bug reported as PR 11854.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63822 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc/win32')
-rw-r--r-- | misc/win32/start.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/misc/win32/start.c b/misc/win32/start.c index cd83860dd..64a0b0dee 100644 --- a/misc/win32/start.c +++ b/misc/win32/start.c @@ -133,6 +133,12 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, const char * const * *argv, const char * const * *env) { + apr_status_t rv = apr_initialize(); + + if (rv != APR_SUCCESS) { + return rv; + } + #if APR_HAS_UNICODE_FS IF_WIN_OS_IS_UNICODE { @@ -142,9 +148,11 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, int dupenv; if (apr_app_init_complete) { - return apr_initialize(); + return rv; } + apr_app_init_complete = 1; + sysstr = GetCommandLineW(); if (sysstr) { wstrs = CommandLineToArgvW(sysstr, &wstrc); @@ -178,10 +186,9 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, free(wenv); } - apr_app_init_complete = 1; } #endif - return apr_initialize(); + return rv; } static int initialized = 0; |