diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llcommon/llfile.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-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.cpp | 11 |
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 | ||
273 | void llofstream::close() | 273 | void 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 | ||
280 | llofstream::llofstream(const char *_Filename, | 282 | llofstream::llofstream(const char *_Filename, |
@@ -286,7 +288,8 @@ llofstream::llofstream(const char *_Filename, | |||
286 | } | 288 | } |
287 | 289 | ||
288 | llofstream::~llofstream() | 290 | llofstream::~llofstream() |
289 | { // destroy the object | 291 | { |
292 | // destroy the object | ||
290 | if (_ShouldClose) | 293 | if (_ShouldClose) |
291 | { | 294 | { |
292 | close(); | 295 | close(); |