When restoring, the vram data pointer is not valid until (depending on
the version of the savefile) the guest has informed us what memory to
use. Thus vram_ptr may be NULL. In this patch we avoid attempting to
clear the video ram in this case.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
}
s->cr[0x27] = s->device_id;
- /* Win2K seems to assume that the pattern buffer is at 0xff
- initially ! */
- memset(s->vram_ptr, 0xff, s->real_vram_size);
+ if (s->vram_ptr)
+ /* Win2K seems to assume that the pattern buffer is at 0xff
+ initially ! */
+ memset(s->vram_ptr, 0xff, s->real_vram_size);
s->cirrus_hidden_dac_lockindex = 5;
s->cirrus_hidden_dac_data = 0;