1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-13 01:29:57 +00:00

Report failure when malloc errors.

This commit is contained in:
Radosław Kujawa 2017-02-15 19:55:15 +01:00
parent 3363959b87
commit ea5c09d7c0

View File

@ -29,6 +29,9 @@ debug_breakpoint_add(rk65c02emu_t *e, uint16_t address)
breakpoint_t *bp; breakpoint_t *bp;
bp = (breakpoint_t *) malloc(sizeof(breakpoint_t)); bp = (breakpoint_t *) malloc(sizeof(breakpoint_t));
if (bp == NULL)
return false;
bp->address = address; bp->address = address;
LL_APPEND((e->bps_head), bp); LL_APPEND((e->bps_head), bp);