Fix a null-checking to prevent return.
authorChanhee Lee <ch2102.lee@samsung.com>
Fri, 15 Oct 2021 06:21:30 +0000 (15:21 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 28 Oct 2021 10:40:48 +0000 (19:40 +0900)
[Problem] A wrong variable is null-checked and display an error log.
[Solution] Null-Check a correct one.

Change-Id: I2ba407fe3513b3e2e13a289fc13fafd19958dd72

subprojects/libbeyond-android/src/main/jni/discovery/beyond-discovery_jni.cc

index 3f4078c00c16dc0e27fa0a05da52cd8e6f944618..6330f99f3d383cf5dda26c2a531264153e6f32d3 100644 (file)
@@ -112,8 +112,8 @@ void DiscoveryNativeInterface::initializeInfo(JNIEnv *env, jclass klass)
         infoObject.klass = nullptr;
         return;
     }
-    if (infoObject.host == nullptr) {
-        ErrPrint("Unable to get the host field from info");
+    if (infoObject.name == nullptr) {
+        ErrPrint("Unable to get the name field from info");
         env->DeleteGlobalRef(infoObject.klass);
         infoObject.klass = nullptr;
         return;