diff options
author | Julien | 2011-06-04 06:46:40 +0800 |
---|---|---|
committer | Julien | 2011-06-23 15:11:36 +0800 |
commit | c52cc849123ac4a6e4a6ce1f0880cb1cd95e23cd (patch) | |
tree | 57cbaaf240bd1177f6bf36257b55882508b1e88f /audio/softsynth | |
parent | 2f200ac49322ff8ccd13c5e8b7a22abbf6ff2610 (diff) | |
download | scummvm-rg350-c52cc849123ac4a6e4a6ce1f0880cb1cd95e23cd.tar.gz scummvm-rg350-c52cc849123ac4a6e4a6ce1f0880cb1cd95e23cd.tar.bz2 scummvm-rg350-c52cc849123ac4a6e4a6ce1f0880cb1cd95e23cd.zip |
AUDIO/BACKENDS/GRAPHICS: Add error checks after allocating memory with malloc
Diffstat (limited to 'audio/softsynth')
-rw-r--r-- | audio/softsynth/opl/mame.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp index 74699ba4c6..15e869ba33 100644 --- a/audio/softsynth/opl/mame.cpp +++ b/audio/softsynth/opl/mame.cpp @@ -725,6 +725,8 @@ static int OPLOpenTable(void) { ENV_CURVE = (int *)malloc(sizeof(int) * (2*EG_ENT+1)); + if (!ENV_CURVE) + error("[OPLOpenTable] Cannot allocate memory"); /* envelope counter -> envelope output table */ for (i=0; i < EG_ENT; i++) { |