Prevent another NULL pointer dereference

This commit is contained in:
twinaphex 2017-01-22 20:06:11 +01:00
parent 4feab7a268
commit 67f850c3dc

View File

@ -41,7 +41,7 @@ struct memstream
static void memstream_update_pos(memstream_t *stream)
{
if (stream->ptr > stream->max_ptr)
if (stream && stream->ptr > stream->max_ptr)
stream->max_ptr = stream->ptr;
}