diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-03-25 22:50:26 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-03-25 22:50:26 +0000 |
commit | 6fcf38217e8772b2f90c7a8e7ce6b60071f6d20c (patch) | |
tree | a8e35fe195cc86c616daf9d8a21571e04bc2bc35 /indra/llcommon/llfile.cpp | |
parent | 11a3589665aae1a2423e258e40eba45c117627d5 (diff) |
merge release@82858 maint-render-2-merge@83010 -> release
QAR-389
Diffstat (limited to 'indra/llcommon/llfile.cpp')
-rw-r--r-- | indra/llcommon/llfile.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index c44650009d..3c590a0d49 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -266,6 +266,7 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */ } llassert(_Filebuffer==NULL); _Filebuffer = new _Myfb(filep); + _ShouldClose = true; _Myios::init(_Filebuffer); } @@ -281,7 +282,7 @@ void llofstream::close() llofstream::llofstream(const char *_Filename, std::ios_base::openmode _Mode, int _Prot) - : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL) + : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL),_ShouldClose(false) { // construct with named file and specified mode open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */ } @@ -289,7 +290,10 @@ llofstream::llofstream(const char *_Filename, llofstream::~llofstream() { // destroy the object - close(); + if (_ShouldClose) + { + close(); + } delete _Filebuffer; } |