Fixed crash on NULL dereference.
This commit is contained in:
Родитель
387e37541d
Коммит
07d909b5f0
|
@ -1110,7 +1110,7 @@ void fpp_domsg(struct Global *global,
|
|||
;
|
||||
tp = file ? file->filename : 0;
|
||||
fpp_Error(global, "%s\"%s\", line %d: %s: ",
|
||||
MSG_PREFIX, tp, global->infile->fp?global->line:file->line, severity);
|
||||
MSG_PREFIX, tp, global->infile?(global->infile->fp?global->line:file->line):0, severity);
|
||||
if(global->error)
|
||||
global->error(global->userdata, ErrorMessage[error], arg);
|
||||
#if defined(UNIX)
|
||||
|
|
|
@ -334,6 +334,7 @@ project "fcpp"
|
|||
"NWORK=65536",
|
||||
"NBUFF=65536",
|
||||
"OLD_PREPROCESSOR=0",
|
||||
"MSG_PREFIX=\"Preprocessor: \"",
|
||||
}
|
||||
|
||||
files {
|
||||
|
|
|
@ -1149,9 +1149,14 @@ namespace bgfx
|
|||
// To avoid commented code being recognized as used feature,
|
||||
// first preprocess pass is used to strip all comments before
|
||||
// substituting code.
|
||||
preprocessor.run(data);
|
||||
bool ok = preprocessor.run(data);
|
||||
delete [] data;
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
size = (uint32_t)preprocessor.m_preprocessed.size();
|
||||
data = new char[size+padding+1];
|
||||
bx::memCopy(data, preprocessor.m_preprocessed.c_str(), size);
|
||||
|
|
Загрузка…
Ссылка в новой задаче