summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 359d93d)
raw | patch | inline | side by side (parent: 359d93d)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 17 May 2009 19:58:51 +0000 (19:58 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 17 May 2009 19:58:51 +0000 (19:58 +0000) |
src/bind/javabind.cpp | patch | blob | history |
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index cb8c778b1b6a64b006d8f618aff6f9c2f992c766..f7022584f73624bfa6a28a9603369856afd9632d 100644 (file)
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
int versionMinor = (vers ) & 0xffff;
msg("Loaded JVM version %d.%d", versionMajor, versionMinor);
- if (!setupGateway())
+ if (!setupGateway()) {
+ // set jvm = NULL, otherwise, this method will return true when called for the second time while the gateway might not have been created!
+ jvm->DestroyJavaVM();
+ jvm = NULL;
+ env = NULL;
+ err("Java bindings: setupGateway() failed");
return false;
+ }
return true;
}