diff options
author | Richard Linden <none@none> | 2010-08-12 09:53:17 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-08-12 09:53:17 -0700 |
commit | 402e2a181831d30a6a2586fd4b0641ba66da99be (patch) | |
tree | 335f57714bbc00510ede9e60c3d363722ef6ee43 /indra/llcommon/llapr.cpp | |
parent | be50a053ed4ae7d0b15fc20f1c6ca0973c56ffd9 (diff) | |
parent | 4e8c33e7252d38d00b5606e1960aa520c75e0227 (diff) |
merge
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); |