1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

throws CachedCharStorageException from native code

This commit is contained in:
Nikolay Pultsin 2012-04-07 15:32:13 +01:00
parent 30f0a850e2
commit 5de272c9d4
5 changed files with 19 additions and 5 deletions

View file

@ -250,7 +250,10 @@ JNIEXPORT jboolean JNICALL Java_org_geometerplus_fbreader_formats_NativeFormatPl
if (!plugin->readModel(*model)) {
return JNI_FALSE;
}
model->flush();
if (!model->flush()) {
AndroidUtil::throwCachedCharStorageException("Cannot write file from native code");
return JNI_FALSE;
}
if (!initInternalHyperlinks(env, javaModel, *model) || !initTOC(env, javaModel, *model)) {
return JNI_FALSE;