Fix segfault with demo cutting (fixes #140)

This commit is contained in:
def 2015-03-13 15:48:30 +01:00
parent 7c503c3197
commit 381b4512fb

View file

@ -368,6 +368,9 @@ int CDemoPlayer::ReadChunkHeader(int *pType, int *pSize, int *pTick)
*pSize = 0;
*pType = 0;
if(m_File == NULL)
return -1;
if(io_read(m_File, &Chunk, sizeof(Chunk)) != sizeof(Chunk))
return -1;