diff options
author | Jeff Trawick <trawick@apache.org> | 2009-05-17 15:55:11 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2009-05-17 15:55:11 +0000 |
commit | 9bc2b59b4a435ec169e3a5ed1deae67f05abd91d (patch) | |
tree | 1a64287677d05f49254e5486321a82912986ebc9 /hooks | |
parent | 302c57d1aa4148936fac354c23b7be8887697f46 (diff) | |
download | apr-9bc2b59b4a435ec169e3a5ed1deae67f05abd91d.tar.gz |
prevent crash if apr_hook_deregister_all() called but no hooks had been registered
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@775681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/apr_hooks.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hooks/apr_hooks.c b/hooks/apr_hooks.c index d8eb82d23..6abe19356 100644 --- a/hooks/apr_hooks.c +++ b/hooks/apr_hooks.c @@ -265,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; |