summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-09-15 13:59:22 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-09-15 14:07:48 +0800
commit446aead5a5913f5c5613b466454af195f5387b01 (patch)
treea18ca090722765c75dbf815e5609b5deff210e80 /platform
parentef667139e152fa6389da2a319a75ebae4e58cc14 (diff)
downloadmupdf-446aead5a5913f5c5613b466454af195f5387b01.tar.xz
JNI: Throw IllegalArgumentException for null arguments.
Diffstat (limited to 'platform')
-rw-r--r--platform/java/mupdf_native.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c
index 40548381..d886ef19 100644
--- a/platform/java/mupdf_native.c
+++ b/platform/java/mupdf_native.c
@@ -3727,8 +3727,9 @@ FUN(Document_proofNative)(JNIEnv *env, jobject self, jstring jCurrentPath, jstri
const char *displayProfile = NULL;
if (!ctx) return NULL;
- if (jCurrentPath == NULL || jPrintProfile == NULL || jDisplayProfile == NULL)
- return NULL;
+ if (!jCurrentPath) { jni_throw_arg(env, "currentPath must not be null"); return NULL; }
+ if (!jPrintProfile) { jni_throw_arg(env, "printProfile must not be null"); return NULL; }
+ if (!jDisplayProfile) { jni_throw_arg(env, "displayProfile must not be null"); return NULL; }
currentPath = (*env)->GetStringUTFChars(env, jCurrentPath, NULL);
if (currentPath == NULL)