fixed do_restore_state()
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 10 May 2008 15:42:17 +0000 (15:42 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 10 May 2008 15:42:17 +0000 (15:42 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4413 c046a42c-6fe2-441c-8c8c-71466251a162

target-mips/op_helper.c

index 26420aa..c126a77 100644 (file)
@@ -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)