aboutsummaryrefslogtreecommitdiff
path: root/cutl/details/boost/regex/src/regex_raw_buffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cutl/details/boost/regex/src/regex_raw_buffer.cxx')
-rw-r--r--cutl/details/boost/regex/src/regex_raw_buffer.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cutl/details/boost/regex/src/regex_raw_buffer.cxx b/cutl/details/boost/regex/src/regex_raw_buffer.cxx
index a0c4811..7b06725 100644
--- a/cutl/details/boost/regex/src/regex_raw_buffer.cxx
+++ b/cutl/details/boost/regex/src/regex_raw_buffer.cxx
@@ -18,6 +18,7 @@
#define BOOST_REGEX_SOURCE
+#include <cutl/details/boost/config.hpp>
#include <memory>
#include <cstring>
#include <cutl/details/boost/assert.hpp>
@@ -45,7 +46,8 @@ void BOOST_REGEX_CALL raw_storage::resize(size_type n)
// allocate and copy data:
register pointer ptr = static_cast<pointer>(::operator new(newsize));
BOOST_REGEX_NOEH_ASSERT(ptr)
- std::memcpy(ptr, start, datasize);
+ if(start)
+ std::memcpy(ptr, start, datasize);
// get rid of old buffer:
::operator delete(start);