aboutsummaryrefslogtreecommitdiff
path: root/src/type_handler.c
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-07-19 15:56:13 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-07-19 15:56:13 +0000
commit5d63b1b2a6968f9c0146e1946b72ca6073370fbe (patch)
treed8c9ef35e0f68c95aac11ebd1decd345ba1f82a8 /src/type_handler.c
parent0f770551cebca90c92b7a39b0e0135a445af51f9 (diff)
svn path=/trunk/externals/loaders/pdj/; revision=11874
Diffstat (limited to 'src/type_handler.c')
-rw-r--r--src/type_handler.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/type_handler.c b/src/type_handler.c
index 0c7bc67..4c0bc37 100644
--- a/src/type_handler.c
+++ b/src/type_handler.c
@@ -44,6 +44,13 @@ int jatoms2atoms(JNIEnv *env, jobjectArray jatoms, int *nb_atoms, t_atom *atoms)
for(i=0;i<*nb_atoms;i++) {
obj = (*env)->GetObjectArrayElement(env, jatoms, i);
+ if ( obj == NULL ) {
+ jclass exception = (*env)->FindClass(env, "java/lang/NullPointerException");
+ ASSERT(exception);
+ (*env)->ThrowNew(env, exception, NULL);
+ (*env)->DeleteLocalRef(env, exception);
+ return 1;
+ }
rc |= jatom2atom(env, obj, atoms+i);
}