mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-21 01:45:30 -04:00
fix nullptr issues
Signed-off-by: sunfei <sunfei.sun@huawei.com> Change-Id: I92e23f9a251ed01c672a177fa66e222ba60a7c5c
This commit is contained in:
@@ -148,9 +148,11 @@ void JSSwiper::SetIndicator(bool showIndicator)
|
||||
{
|
||||
auto component = ViewStackProcessor::GetInstance()->GetMainComponent();
|
||||
auto swiper = AceType::DynamicCast<OHOS::Ace::SwiperComponent>(component);
|
||||
swiper->SetShowIndicator(showIndicator);
|
||||
if (!showIndicator && swiper) {
|
||||
swiper->SetIndicator(nullptr);
|
||||
if (swiper) {
|
||||
swiper->SetShowIndicator(showIndicator);
|
||||
if (!showIndicator) {
|
||||
swiper->SetIndicator(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user