diff options
author | 2010-07-30 21:37:41 +0200 | |
---|---|---|
committer | 2010-07-30 21:37:41 +0200 | |
commit | 6cb93555535f85e5e0744cc6f9bcf6f189115287 (patch) | |
tree | 09cae84d881c779b507d7ef32513d5015e511665 /plugins/gme/game-music-emu-0.5.5 | |
parent | 2b1d2359af867b01d5da698647f09c77c9e978f3 (diff) |
fixed crash in gme ay player
Diffstat (limited to 'plugins/gme/game-music-emu-0.5.5')
-rw-r--r-- | plugins/gme/game-music-emu-0.5.5/gme/Ay_Emu.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/gme/game-music-emu-0.5.5/gme/Ay_Emu.cpp b/plugins/gme/game-music-emu-0.5.5/gme/Ay_Emu.cpp index 0ee592e3..7f2c0613 100644 --- a/plugins/gme/game-music-emu-0.5.5/gme/Ay_Emu.cpp +++ b/plugins/gme/game-music-emu-0.5.5/gme/Ay_Emu.cpp @@ -17,6 +17,7 @@ License along with this module; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "blargg_source.h" +#include <stdio.h> long const spectrum_clock = 3546900; long const cpc_clock = 2000000; @@ -212,6 +213,10 @@ blargg_err_t Ay_Emu::start_track_( int track ) //debug_printf( "addr: $%04X, len: $%04X\n", addr, len ); if ( addr < ram_start && addr >= 0x400 ) // several tracks use low data debug_printf( "Block addr in ROM\n" ); + + if (!in) { + return "NULL in pointer\n"; + } memcpy( mem.ram + addr, in, len ); if ( file.end - blocks < 8 ) |