Ensure that pallette variable has been freed before attempting malloc a new heap.

This commit is contained in:
Matthew Budd 2020-05-12 22:45:08 -04:00
parent 9583c0fbdd
commit 61f55f3e28
1 changed files with 5 additions and 0 deletions

View File

@ -218,6 +218,11 @@ int InitBlitToHigh(int b, uint32 rmask, uint32 gmask, uint32 bmask, int efx, int
return(0);
//allocate adequate room for 32bpp palette
if ( palettetranslate )
{
free(palettetranslate);
palettetranslate=NULL;
}
palettetranslate=(uint32*)FCEU_dmalloc(256*4 + 512*4);
if(!palettetranslate)