summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-07 12:43:55 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-07 12:43:55 +0100
commit22f65ad046271d5f2ac0de19502dcd13bf8c4041 (patch)
treec3921e7ae800255c1adab9665548b313a19fb14c /indra/llcommon
parent52138b24c509667c217b91ee17972b74e797bf4a (diff)
parentbcd84433717e42ec8675009e1335caf915cc1a41 (diff)
merge from viewer-release
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llapr.cpp12
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);