summaryrefslogtreecommitdiff
path: root/sj2
diff options
context:
space:
mode:
authorKay Ramme <kr@openoffice.org>2001-08-30 14:30:06 +0000
committerKay Ramme <kr@openoffice.org>2001-08-30 14:30:06 +0000
commit0a6c22e01e8f2587c024704f8e5d2a759a35042b (patch)
tree93fae65d537b54a19f1d529b678887d013892d70 /sj2
parent1f8cef506911832541816959392aeeed1b7fa35b (diff)
exception messages may be empty (#91743#)
Diffstat (limited to 'sj2')
-rw-r--r--sj2/source/jscpp/sjapplet_impl.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx
index b4f142889b75..28f63628c014 100644
--- a/sj2/source/jscpp/sjapplet_impl.cxx
+++ b/sj2/source/jscpp/sjapplet_impl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sjapplet_impl.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pl $ $Date: 2001-08-15 11:21:55 $
+ * last change: $Author: kr $ $Date: 2001-08-30 15:30:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,9 +130,12 @@ static void testJavaException(JNIEnv * pEnv) throw(com::sun::star::uno::Runtime
jstring jsMessage = (jstring)pEnv->CallObjectMethod(jtThrowable, jmThrowable_getMessage);
- const jchar * jcMessage = pEnv->GetStringChars(jsMessage, NULL);
- OUString ouMessage(jcMessage);
- pEnv->ReleaseStringChars(jsMessage, jcMessage);
+ OUString ouMessage;
+ if(jsMessage) {
+ const jchar * jcMessage = pEnv->GetStringChars(jsMessage, NULL);
+ ouMessage = OUString(jcMessage);
+ pEnv->ReleaseStringChars(jsMessage, jcMessage);
+ }
throw RuntimeException(ouMessage, Reference<XInterface>());
}