diff --git a/src/osgPlugins/curl/ReaderWriterCURL.cpp b/src/osgPlugins/curl/ReaderWriterCURL.cpp index 1aa36166f..628da025a 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.cpp +++ b/src/osgPlugins/curl/ReaderWriterCURL.cpp @@ -378,6 +378,9 @@ osgDB::ReaderWriter::ReadResult EasyCurl::processResponse(CURLcode res, const st ReaderWriterCURL::ReaderWriterCURL() { + // initialize curl to ensure it's done single threaded + curl_global_init(CURL_GLOBAL_ALL); + supportsProtocol("http","Read from http port using libcurl."); supportsProtocol("https","Read from https port using libcurl."); supportsProtocol("ftp","Read from ftp port using libcurl."); @@ -395,6 +398,11 @@ ReaderWriterCURL::ReaderWriterCURL() ReaderWriterCURL::~ReaderWriterCURL() { //OSG_NOTICE<<"ReaderWriterCURL::~ReaderWriterCURL()"<