From 4e00f691dcf9f85e89fb23bb6fde44d297b25169 Mon Sep 17 00:00:00 2001 From: hiker Date: Thu, 27 Nov 2014 09:17:08 +1100 Subject: [PATCH] Added an assert to check if new was successful. --- src/io/file_manager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index 84abaa736..60e2d69ba 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -423,6 +423,7 @@ XMLNode *FileManager::createXMLTreeFromString(const std::string & content) try { char *b = new char[content.size()]; + assert(b); memcpy(b, content.c_str(), content.size()); io::IReadFile * ireadfile = m_file_system->createMemoryReadFile(b, (int)content.size(),