--- old/src/windows/native/java/lang/ProcessEnvironment_md.c 2014-02-04 11:40:55.283810001 +0000 +++ new/src/windows/native/java/lang/ProcessEnvironment_md.c 2014-02-04 11:40:55.003810007 +0000 @@ -32,10 +32,15 @@ environmentBlock9x(JNIEnv *env) { int i; - jmethodID String_init_ID = - (*env)->GetMethodID(env, JNU_ClassString(env), "", "([B)V"); + jmethodID String_init_ID; jbyteArray bytes; - jbyte *blockA = (jbyte *) GetEnvironmentStringsA(); + jbyte *blockA; + + String_init_ID = + (*env)->GetMethodID(env, JNU_ClassString(env), "", "([B)V"); + CHECK_NULL_RETURN(String_init_ID, NULL); + + blockA = (jbyte *) GetEnvironmentStringsA(); if (blockA == NULL) { /* Both GetEnvironmentStringsW and GetEnvironmentStringsA * failed. Out of memory is our best guess. */