summaryrefslogtreecommitdiff
path: root/libio/streambuf.cc
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-06 07:32:08 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-06 07:32:08 +0000
commit00425ad08342ab19e34e579548145fffd8eacbc8 (patch)
treec7997ffcc716eab50b0e84ff6357fe827a036f96 /libio/streambuf.cc
parenta71a14ea4333ff4c9c415eb14181bb4fd2675acd (diff)
downloadgcc-00425ad08342ab19e34e579548145fffd8eacbc8.tar.gz
* streambuf.cc (streambuf::~streambuf): Don't delete _lock
for _IO_stdin/_IO_stdout/_IO_stderr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libio/streambuf.cc')
-rw-r--r--libio/streambuf.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/streambuf.cc b/libio/streambuf.cc
index e87590f86d1..4393cf08cfd 100644
--- a/libio/streambuf.cc
+++ b/libio/streambuf.cc
@@ -220,7 +220,8 @@ streambuf::~streambuf()
{
_IO_default_finish(this,0);
#ifdef _IO_MTSAFE_IO
- delete _lock;
+ if (this != _IO_stdin && this != _IO_stdout && this != _IO_stderr)
+ delete _lock;
#endif
}