Prevent null pointer dereference

This commit is contained in:
twinaphex 2016-09-22 16:10:51 +02:00
parent 4db42db980
commit 693a9660f3

View File

@ -422,6 +422,10 @@ static void content_flush_save_blocks(struct sram_block **blocks,
for (i = 0; i < num_blocks; i++)
{
struct sram_block *block = (struct sram_block*)&blocks[i];
if (!block || !block->data)
continue;
free(block->data);
}
}