avoid crash in .bullet file reading on empty files (or file-not-found)
This commit is contained in:
1 parent
ae09329a9d
commit
d2cc0d73c5
1 file changed
+3
@@ -108,6 +108,9 @@ bFile::~bFile()
|
||||
// ----------------------------------------------------- //
|
||||
void bFile::parseHeader()
|
||||
{
|
||||
if (!mFileLen || !mFileBuffer)
|
||||
return;
|
||||
|
||||
char *blenderBuf = mFileBuffer;
|
||||
char header[SIZEOFBLENDERHEADER+1] ;
|
||||
memcpy(header, blenderBuf, SIZEOFBLENDERHEADER);
|
||||
|
||||
Reference in new issue
Block a user