mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
fixed crash in native code
This commit is contained in:
parent
a9610d892c
commit
0448971a1c
2 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue