From d1d018768afd79cb2ecd1805f0d8f3ed23f4076b Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 29 Jan 2012 13:30:57 +0100 Subject: Upstream tarball 2.2.22 --- srclib/apr-util/hooks/apr_hooks.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'srclib/apr-util/hooks') diff --git a/srclib/apr-util/hooks/apr_hooks.c b/srclib/apr-util/hooks/apr_hooks.c index 44353cbb..6abe1935 100644 --- a/srclib/apr-util/hooks/apr_hooks.c +++ b/srclib/apr-util/hooks/apr_hooks.c @@ -243,6 +243,10 @@ APU_DECLARE(void) apr_hook_sort_all(void) #endif int n; + if (!s_aHooksToSort) { + s_aHooksToSort = apr_array_make(apr_hook_global_pool, 1, sizeof(HookSortEntry)); + } + for(n=0 ; n < s_aHooksToSort->nelts ; ++n) { HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n]; *pEntry->paHooks=sort_hook(*pEntry->paHooks,pEntry->szHookName); @@ -261,6 +265,10 @@ APU_DECLARE(void) apr_hook_deregister_all(void) #endif int n; + if (!s_aHooksToSort) { + return; + } + for(n=0 ; n < s_aHooksToSort->nelts ; ++n) { HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n]; *pEntry->paHooks=NULL; -- cgit v1.2.3