diff --git a/frameworks/ets/ani/src/sts_bundle_option.cpp b/frameworks/ets/ani/src/sts_bundle_option.cpp index e3cf681e6857e1db5e830c7af3e6d62a1c3c35bf..aa924feaa361ec91e150bece53907b940e02148e 100644 --- a/frameworks/ets/ani/src/sts_bundle_option.cpp +++ b/frameworks/ets/ani/src/sts_bundle_option.cpp @@ -119,8 +119,7 @@ bool WrapBundleOption(ani_env* env, return false; } ani_class bundleCls = nullptr; - if (!CreateClassObjByClassName(env, - "notification.NotificationCommonDef.BundleOptionInner", bundleCls, bundleObject) + if (!CreateClassObjByClassName(env, "notification.NotificationCommonDef.BundleOptionInner", bundleCls, bundleObject) || bundleCls == nullptr || bundleObject == nullptr) { ANS_LOGE("WrapBundleOption: create BundleOption failed"); return false;