diff --git a/frameworks/native/appkit/app/ohos_application.cpp b/frameworks/native/appkit/app/ohos_application.cpp index 41713dde52b85c112228af397a2d7c92e0cf22f6..d79309f853f8077f92a1cf624fe41a44ad3be972 100644 --- a/frameworks/native/appkit/app/ohos_application.cpp +++ b/frameworks/native/appkit/app/ohos_application.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -746,7 +746,7 @@ void OHOSApplication::ScheduleAcceptWant(const AAFwk::Want &want, const std::str return; } auto iter = abilityStages_.find(moduleName); - if (iter == abilityStages_.end() && iter->second == nullptr) { + if (iter == abilityStages_.end() || iter->second == nullptr) { TAG_LOGE(AAFwkTag::APPKIT, "%{public}s is not in abilityStage", moduleName.c_str()); std::string flag; callback(flag);