diff options
author | Jacek Antonelli | 2008-09-06 18:27:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:27:41 -0500 |
commit | d78e22887482056e9e29cccf2b7a8a675035d040 (patch) | |
tree | a0e0fde1b1a8f91d66c3eb84871b0a3c34947419 /linden/indra/newview/lltexturecache.cpp | |
parent | Second Life viewer sources 1.21.0-RC (diff) | |
download | meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.zip meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.gz meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.bz2 meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.xz |
Second Life viewer sources 1.21.1-RC
Diffstat (limited to 'linden/indra/newview/lltexturecache.cpp')
-rw-r--r-- | linden/indra/newview/lltexturecache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index da23710..c9ad5a3 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp | |||
@@ -792,6 +792,14 @@ bool LLTextureCacheRemoteWorker::doWrite() | |||
792 | //virtual | 792 | //virtual |
793 | bool LLTextureCacheWorker::doWork(S32 param) | 793 | bool LLTextureCacheWorker::doWork(S32 param) |
794 | { | 794 | { |
795 | //allocate a new local apr_pool | ||
796 | LLAPRPool pool ; | ||
797 | |||
798 | //save the current mFileAPRPool to avoid breaking anything. | ||
799 | apr_pool_t* old_pool = mCache->getFileAPRPool() ; | ||
800 | //make mFileAPRPool to point to the local one | ||
801 | mCache->setFileAPRPool(pool.getAPRPool()) ; | ||
802 | |||
795 | bool res = false; | 803 | bool res = false; |
796 | if (param == 0) // read | 804 | if (param == 0) // read |
797 | { | 805 | { |
@@ -805,6 +813,10 @@ bool LLTextureCacheWorker::doWork(S32 param) | |||
805 | { | 813 | { |
806 | llassert_always(0); | 814 | llassert_always(0); |
807 | } | 815 | } |
816 | |||
817 | //set mFileAPRPool back, the local one will be released automatically. | ||
818 | mCache->setFileAPRPool(old_pool) ; | ||
819 | |||
808 | return res; | 820 | return res; |
809 | } | 821 | } |
810 | 822 | ||