Mercurial > audlegacy
diff Plugins/Input/sexypsf/PsxMem.c @ 335:e089ce1ba088 trunk
[svn] further paranoia (try to explain why the crash happened, if one happens -- as sexypsf explodes if it cant find the psflib)
author | nenolod |
---|---|
date | Sun, 25 Dec 2005 14:10:13 -0800 |
parents | 42cdc99e395a |
children | f26682a2825b |
line wrap: on
line diff
--- a/Plugins/Input/sexypsf/PsxMem.c Sun Dec 25 13:31:46 2005 -0800 +++ b/Plugins/Input/sexypsf/PsxMem.c Sun Dec 25 14:10:13 2005 -0800 @@ -87,11 +87,22 @@ } void psxMemShutdown() { - free(psxM); - free(psxP); - free(psxH); - free(psxR); - free(psxMemLUT); + if (psxM) + free(psxM); + + if (psxP) + free(psxP); + + if (psxH) + free(psxH); + + if (psxR) + free(psxR); + + if (psxMemLUT) + free(psxMemLUT); + + psxM = psxP = psxH = psxR = psxMemLUT = NULL; } u8 psxMemRead8(u32 mem) {