projects
/
contrib
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix for JIRA IOT-2044.
[contrib/iotivity.git]
/
java
/
jni
/
JniOcRepresentation.cpp
diff --git
a/java/jni/JniOcRepresentation.cpp
b/java/jni/JniOcRepresentation.cpp
index
042e2a4
..
27e96a9
100644
(file)
--- a/
java/jni/JniOcRepresentation.cpp
+++ b/
java/jni/JniOcRepresentation.cpp
@@
-196,7
+196,9
@@
JNIEXPORT void JNICALL Java_org_iotivity_base_OcRepresentation_setValueStringN
}
std::string key = env->GetStringUTFChars(jKey, nullptr);
- std::string value = env->GetStringUTFChars(jValue, nullptr);
+ std::string value;
+ if(jValue)
+ value = env->GetStringUTFChars(jValue, nullptr);
rep->setValue(key, value);
}