mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix segfault with demo cutting (fixes #140)
This commit is contained in:
parent
7c503c3197
commit
381b4512fb
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue