diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-08-06 09:29:33 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-08-06 09:29:33 -0600 |
commit | fd3891ead58389121c69fec2106a9f30ed48b88c (patch) | |
tree | fbd4df73bcf6412ff80df99051f6949b77a4e1f1 /indra/llcommon | |
parent | b103141506534b08543fe1d135764a613e6d0c8b (diff) |
EXT-8447: FIXED: crash at LLTextureCache::writeEntryToHeaderImmediately(int,LLTextureCache::Entry &,bool) [secondlife-bin lltexturecache.cpp]
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llapr.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 7330b00bcf..dca4cf7c3f 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -417,7 +417,11 @@ apr_pool_t* LLAPRFile::getAPRFilePool(apr_pool_t* pool) // File I/O S32 LLAPRFile::read(void *buf, S32 nbytes) { - llassert_always(mFile) ; + if(!mFile) + { + llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ; + return 0; + } apr_size_t sz = nbytes; apr_status_t s = apr_file_read(mFile, buf, &sz); @@ -435,7 +439,11 @@ S32 LLAPRFile::read(void *buf, S32 nbytes) S32 LLAPRFile::write(const void *buf, S32 nbytes) { - llassert_always(mFile) ; + if(!mFile) + { + llwarns << "apr mFile is removed by somebody else. Can not write." << llendl ; + return 0; + } apr_size_t sz = nbytes; apr_status_t s = apr_file_write(mFile, buf, &sz); |