Author: trawick Date: Thu Dec 17 19:18:57 2009 New Revision: 891851 URL: http://svn.apache.org/viewvc?rev=891851&view=rev Log: merge r775681 from apr trunk prevent crash if apr_hook_deregister_all() called but no hooks had been registered Modified: apr/apr-util/branches/1.4.x/hooks/apr_hooks.c Modified: apr/apr-util/branches/1.4.x/hooks/apr_hooks.c URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/hooks/apr_hooks.c?rev=891851&r1=891850&r2=891851&view=diff ============================================================================== --- apr/apr-util/branches/1.4.x/hooks/apr_hooks.c (original) +++ apr/apr-util/branches/1.4.x/hooks/apr_hooks.c Thu Dec 17 19:18:57 2009 @@ -265,6 +265,10 @@ #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;