Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12768/src/libopenvrml/openvrml
Modified Files:
vrml97node.cpp
Log Message:
Define the scoped_lock before the call to setjmp; otherwise, a longjmp call from libjpeg code will prevent the destructor from running (and freeing the mutex).
Index: vrml97node.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -C2 -d -r1.120 -r1.121
*** vrml97node.cpp 22 Jan 2007 21:10:09 -0000 1.120
--- vrml97node.cpp 13 Feb 2007 08:57:03 -0000 1.121
***************
*** 7245,7248 ****
--- 7245,7251 ----
do_read(const std::vector<unsigned char> & data)
{
+ boost::recursive_mutex::scoped_lock
+ lock(this->stream_listener.node_mutex_);
+
if (data.size() > this->buffer.size()) {
this->buffer.resize(data.size());
***************
*** 7256,7262 ****
case jpeg_reader::header:
{
- boost::recursive_mutex::scoped_lock
- lock(this->stream_listener.node_mutex_);
-
static const bool require_image = true;
const int read_header_result = jpeg_read_header(&this->cinfo_,
--- 7259,7262 ----
|