diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 16:41:02 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 16:41:02 +0300 |
commit | b5df08724acf103be44436db8cc5689275ba60d0 (patch) | |
tree | 0924c4765c72675c42d369715f136ee286f3cb9d /indra/llcommon/llapr.cpp | |
parent | ed5212f0e9795f00cbed9e674b58c53059605e64 (diff) | |
parent | 4db872e11ea5d322c20de9ddde484cb39690c1a2 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llcommon/llapr.cpp')
-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); |