Merge pull request #355 from lostdj/patch-1

cp/avian/java-net.cpp: fix segfault
This commit is contained in:
Joel Dice 2014-10-10 09:37:11 -06:00
commit 022be0c370

View File

@ -97,6 +97,11 @@ extern "C" JNIEXPORT jint JNICALL
jclass, jclass,
jstring name) jstring name)
{ {
if(!name) {
throwNew(e, "java/lang/NullPointerException", 0);
return 0;
}
const char* chars = e->GetStringUTFChars(name, 0); const char* chars = e->GetStringUTFChars(name, 0);
if (chars) { if (chars) {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS