1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

fixed crash in native code

This commit is contained in:
Nikolay Pultsin 2012-03-03 09:42:22 +00:00
parent a9610d892c
commit 0448971a1c
2 changed files with 9 additions and 3 deletions

View file

@ -86,9 +86,8 @@ JNIEXPORT jboolean JNICALL Java_org_geometerplus_fbreader_formats_NativeFormatPl
return JNI_FALSE;
}
return JNI_FALSE;
shared_ptr<Book> book = Book::loadFromJavaBook(env, javaBook);
if (!plugin->readMetaInfo(*book)) {
return JNI_FALSE;
}

View file

@ -21,8 +21,15 @@
#include <AndroidUtil.h>
#include <ZLibrary.h>
extern "C"
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) {
AndroidUtil::init(jvm);
if (AndroidUtil::init(jvm)) {
int argc = 0;
char **argv = 0;
ZLibrary::init(argc, argv);
ZLibrary::initApplication("FBReader");
}
return JNI_VERSION_1_2;
}