diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-05-02 18:29:29 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-05-02 18:29:29 -0700 |
commit | 2a38f79ded7f040c2f8b1b9cccdfca7d970530df (patch) | |
tree | 45550079e7c5b23df534aef93476a9779bfd328c | |
parent | 817ce6db7cbf7ef33095011077644feade624e11 (diff) |
Handle failures to load save state from the menu more gracefully
-rw-r--r-- | menu.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -301,6 +301,9 @@ void * menu_write_w(uint32_t address, void * context, uint16_t value) char *gstpath = alloc_concat_m(3, parts); uint32_t pc = load_gst(gen->next_context, gstpath); free(gstpath); + if (!pc) { + break; + } gen->next_context->m68k->resume_pc = get_native_address_trans(gen->next_context->m68k, pc); } m68k->should_return = 1; |