Added null check in UniversalSwitchPagePresenter 56/260856/1
authorMaria Bialota <m.bialota@samsung.com>
Mon, 5 Jul 2021 17:44:46 +0000 (19:44 +0200)
committerMaria Bialota <m.bialota@samsung.com>
Mon, 5 Jul 2021 17:45:04 +0000 (19:45 +0200)
Change-Id: I73ed6d67f3616c9cfd0e127daee2e1c2f6f66ecd

src/presenter/UniversalSwitchPagePresenter.cpp

index 1b6cfb28827ef585315a430d711ae32943c6471e..8d9f3a8eb9de923418cbbec93b64a8d783cfcddc 100644 (file)
@@ -55,7 +55,8 @@ UniversalSwitchPagePresenter::UniversalSwitchPagePresenter()
                model_.sentinel_->configurationServiceState_.value()));
 
        model_.sentinel_->configurationServiceState_.attach([this, &items](auto value) {
-               this->getAction("titleRightAction")->enabled_ = value;
+               auto action = this->getAction("titleRightAction");
+               if(action) action->enabled_ = value;
                items.front()->enabled_ = value;
        });