- bugfix for segfault with new debug method needs to properly init debug system in a new area

This commit is contained in:
Mark Vejvoda 2011-03-28 04:30:52 +00:00
parent 3b56aa4475
commit 8be4bafdcf
2 changed files with 9 additions and 1 deletions

View File

@ -126,7 +126,7 @@ public:
~SystemFlags();
static void init(bool haveSpecialOutputCommandLineOption);
static SystemFlagsType & getSystemSettingType(DebugType type) { return (*debugLogFileList)[type]; }
static SystemFlagsType & getSystemSettingType(DebugType type);
static size_t httpWriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data);
static std::string getHTTP(std::string URL,CURL *handle=NULL, int timeOut=-1, CURLcode *savedResult=NULL);
static std::string escapeURL(std::string URL, CURL *handle=NULL);

View File

@ -185,6 +185,14 @@ CURL *SystemFlags::initHTTP() {
return handle;
}
SystemFlags::SystemFlagsType & SystemFlags::getSystemSettingType(DebugType type) {
if(SystemFlags::debugLogFileList == NULL) {
SystemFlags::init(false);
}
return (*debugLogFileList)[type];
}
void SystemFlags::init(bool haveSpecialOutputCommandLineOption) {
SystemFlags::haveSpecialOutputCommandLineOption = haveSpecialOutputCommandLineOption;
//if(SystemFlags::debugLogFileList.size() == 0) {