aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llfile.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llcommon/llfile.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llfile.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp
index d551f28..32e9622 100644
--- a/linden/indra/llcommon/llfile.cpp
+++ b/linden/indra/llcommon/llfile.cpp
@@ -272,9 +272,11 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */
272 272
273void llofstream::close() 273void llofstream::close()
274{ // close the C stream 274{ // close the C stream
275 llassert(_Filebuffer); 275 if(is_open())
276 if (_Filebuffer->close() == 0) 276 {
277 _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ 277 if (_Filebuffer->close() == 0)
278 _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/
279 }
278} 280}
279 281
280llofstream::llofstream(const char *_Filename, 282llofstream::llofstream(const char *_Filename,
@@ -286,7 +288,8 @@ llofstream::llofstream(const char *_Filename,
286} 288}
287 289
288llofstream::~llofstream() 290llofstream::~llofstream()
289{ // destroy the object 291{
292 // destroy the object
290 if (_ShouldClose) 293 if (_ShouldClose)
291 { 294 {
292 close(); 295 close();