* src/vm/jit/code.c (code_get_methodinfo_for_pv): Return NULL if code
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 27 Sep 2007 18:57:57 +0000 (20:57 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 27 Sep 2007 18:57:57 +0000 (20:57 +0200)
is NULL (asm_vm_call_method).

src/vm/jit/code.c

index 4a2e252ab36278f0f989ecee272dadf410760270..6458c9e307faee0d667edce13f903528092a7d5a 100644 (file)
@@ -173,6 +173,11 @@ methodinfo *code_get_methodinfo_for_pv(u1 *pv)
 
        code = *((codeinfo **) (pv + CodeinfoPointer));
 
+       /* This is the case for asm_vm_call_method. */
+
+       if (code == NULL)
+               return NULL;
+
        return code->m;
 }