# HG changeset patch # User Matthias Grimmer # Date 1409123580 -7200 # Node ID 41f66e61b39a23e23539416e005d42692634ea69 # Parent 80fb94b07db23de2a70abbe1c9ff11dae1cce194 NFI: fix FunctionHandle resolving diff -r 80fb94b07db2 -r 41f66e61b39a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nfi/HotSpotNativeFunctionInterface.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nfi/HotSpotNativeFunctionInterface.java Tue Aug 26 20:02:42 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nfi/HotSpotNativeFunctionInterface.java Wed Aug 27 09:13:00 2014 +0200 @@ -146,8 +146,12 @@ private HotSpotNativeFunctionHandle createHandle(NativeFunctionPointer functionPointer, Class returnType, Class... argumentTypes) { HotSpotNativeFunctionPointer hs = (HotSpotNativeFunctionPointer) functionPointer; - InstalledCode code = installNativeFunctionStub(hs.value, returnType, argumentTypes); - return new HotSpotNativeFunctionHandle(code, hs.name, argumentTypes); + if (hs != null) { + InstalledCode code = installNativeFunctionStub(hs.value, returnType, argumentTypes); + return new HotSpotNativeFunctionHandle(code, hs.name, argumentTypes); + } else { + return null; + } } /**