summaryrefslogtreecommitdiffstats
path: root/java/jni/direct_bt/DBTGattCharacteristic.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'java/jni/direct_bt/DBTGattCharacteristic.cxx')
-rw-r--r--java/jni/direct_bt/DBTGattCharacteristic.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/java/jni/direct_bt/DBTGattCharacteristic.cxx b/java/jni/direct_bt/DBTGattCharacteristic.cxx
index 6260818a..955b59ba 100644
--- a/java/jni/direct_bt/DBTGattCharacteristic.cxx
+++ b/java/jni/direct_bt/DBTGattCharacteristic.cxx
@@ -77,10 +77,7 @@ jobject Java_direct_1bt_tinyb_DBTGattCharacteristic_getDescriptorsImpl(JNIEnv *e
std::function<jobject(JNIEnv*, jclass, jmethodID, GATTDescriptor *)> ctor_desc =
[](JNIEnv *env, jclass clazz, jmethodID clazz_ctor, GATTDescriptor *descriptor)->jobject {
// prepare adapter ctor
- std::shared_ptr<GATTCharacteristic> characteristic = descriptor->getCharacteristic();
- if( nullptr == characteristic ) {
- throw IllegalStateException("Descriptor's GATTCharacteristic destructed: "+descriptor->toString(), E_FILE_LINE);
- }
+ std::shared_ptr<GATTCharacteristic> characteristic = descriptor->getCharacteristicChecked();
JavaGlobalObj::check(characteristic->getJavaObject(), E_FILE_LINE);
jobject jcharacteristic = JavaGlobalObj::GetObject(characteristic->getJavaObject());