avoid crash in .bullet file reading on empty files (or file-not-found)

This commit is contained in:
erwin.coumans
2010-05-12 23:18:11 +00:00
parent ae09329a9d
commit d2cc0d73c5

View File

@@ -108,6 +108,9 @@ bFile::~bFile()
// ----------------------------------------------------- //
void bFile::parseHeader()
{
if (!mFileLen || !mFileBuffer)
return;
char *blenderBuf = mFileBuffer;
char header[SIZEOFBLENDERHEADER+1] ;
memcpy(header, blenderBuf, SIZEOFBLENDERHEADER);