diff --git a/src/controller/java/AndroidClusterExceptions.cpp b/src/controller/java/AndroidClusterExceptions.cpp index 1dd5005c73cb0b..9e49d4823afd89 100644 --- a/src/controller/java/AndroidClusterExceptions.cpp +++ b/src/controller/java/AndroidClusterExceptions.cpp @@ -71,7 +71,7 @@ CHIP_ERROR AndroidClusterExceptions::CreateIllegalStateException(JNIEnv * env, c void AndroidClusterExceptions::ReturnIllegalStateException(JNIEnv * env, jobject callback, const char message[], ChipError errorCode) { - VerifyOrReturn(callback == nullptr, ChipLogDetail(Zcl, "Callback is null in ReturnIllegalStateException(), exiting early")); + VerifyOrReturn(callback != nullptr, ChipLogDetail(Zcl, "Callback is null in ReturnIllegalStateException(), exiting early")); CHIP_ERROR err = CHIP_NO_ERROR; jmethodID method;