* src/vm/jit/powerpc/md.c (md_get_method_patch_address): Return NULL
[cacao.git] / src / vm / jit / sparc64 / md.c
index f4f356d406dd40045018d231ae7cf4552bd99b67..d01a4d83fbfe3a6638b34a39d76275878d4fd2e9 100644 (file)
@@ -274,6 +274,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
                if (mcode_masked == 0x0602c5) {
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
 
                } else {