From afc89cdd95616ebb316f5a7a358e8be6a907fefa Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 22 Dec 2012 23:55:37 +0000 Subject: [PATCH] Tweak libSvn usage: fixes a crash on Mac. Work-around a crash on certain Mac builds (I can't tell why other work fine) where the called parameters to apr_pool_create_ex are problematic. Explicitly pass the default values for the function. --- simgear/scene/tsync/terrasync.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/simgear/scene/tsync/terrasync.cxx b/simgear/scene/tsync/terrasync.cxx index f0e8a3b7..2ddd895f 100644 --- a/simgear/scene/tsync/terrasync.cxx +++ b/simgear/scene/tsync/terrasync.cxx @@ -597,8 +597,15 @@ int SGTerraSync::SvnThread::svnClientSetup(void) return EXIT_FAILURE; #endif - apr_pool_t *pool; - apr_pool_create(&pool, NULL); + apr_pool_t *pool = NULL; + + apr_allocator_t* allocator = NULL; + int aprErr = apr_allocator_create(&allocator); + if (aprErr != APR_SUCCESS) + return EXIT_FAILURE; + + apr_pool_create_ex(&pool, NULL /* parent pool */, NULL /* abort func */, allocator); + svn_error_t *err = NULL; SVN_VERSION_DEFINE(_svn_version); err = svn_ver_check_list(&_svn_version, mysvn_checklist); -- 2.39.5