From 9a2b45caa81d8fb056802dfe3c25f214e808ffdf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 19 Aug 2014 21:01:28 +0100 Subject: Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X. --- src/lib/update.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/update.cc') diff --git a/src/lib/update.cc b/src/lib/update.cc index af3e46f0e..7bec061e9 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -18,7 +18,6 @@ */ #include -#include #include #include #include @@ -26,13 +25,13 @@ #include "update.h" #include "version.h" #include "ui_signaller.h" +#include "safe_stringstream.h" #define BUFFER_SIZE 1024 using std::cout; using std::min; using std::string; -using std::stringstream; using libdcp::raw_convert; UpdateChecker* UpdateChecker::_instance = 0; @@ -103,10 +102,9 @@ UpdateChecker::thread () } _buffer[_offset] = '\0'; - stringstream s; - s << _buffer; + string s (_buffer); cxml::Document doc ("Update"); - doc.read_stream (s); + doc.read_string (s); { boost::mutex::scoped_lock lm (_data_mutex); -- cgit v1.2.3