diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 26420aa3cb979d4f6aec466f367b608028e474f0..c126a7768e4d87b0597fe58a9f25c8447ca275f6 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -50,11 +50,13 @@ void do_raise_exception (uint32_t exception) void do_restore_state (void *pc_ptr) { - TranslationBlock *tb; - unsigned long pc = (unsigned long) pc_ptr; - - tb = tb_find_pc (pc); - cpu_restore_state (tb, env, pc, NULL); + TranslationBlock *tb; + unsigned long pc = (unsigned long) pc_ptr; + + tb = tb_find_pc (pc); + if (tb) { + cpu_restore_state (tb, env, pc, NULL); + } } void do_raise_exception_direct_err (uint32_t exception, int error_code)