src/windows/native/sun/windows/awt_new.cpp

Print this page

        

*** 147,157 **** // This function is called when a std::bad_alloc exception is caught. void handle_bad_alloc(void) { if (jvm != NULL) { JNIEnv* env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); ! if (env != NULL) { JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError"); } } } --- 147,157 ---- // This function is called when a std::bad_alloc exception is caught. void handle_bad_alloc(void) { if (jvm != NULL) { JNIEnv* env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); ! if (env != NULL && !env->ExceptionCheck()) { JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError"); } } }