[FIX] increment & decrement value of UIElement 58/165758/2
authorPawel Kurowski <p.kurowski2@samsung.com>
Wed, 3 Jan 2018 17:50:44 +0000 (18:50 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Mon, 29 Jan 2018 09:37:05 +0000 (09:37 +0000)
Due to change of lambda signature from std::shared_ptr<AtspiAccessible>
to DBus::ValueOrError<std::shared_ptr<AtspiAccessible>>
addintional Null check  is requiered.

Change-Id: I5864f61740ef9ce2e255d114953aa7f20bf2f4d3

src/UIElement.cpp

index def19e5..1fc1760 100644 (file)
@@ -190,7 +190,7 @@ namespace
 
                atspi->getObjectInRelation(obj, ATSPI_RELATION_CONTROLLER_FOR,
                [atspi, obj, setCurrentValue](DBus::ValueOrError<std::shared_ptr<AtspiAccessible>> objInRelation) {
-                       if (!objInRelation)
+                       if (!objInRelation || !std::get<0>(objInRelation))
                                objInRelation = obj;
 
                        atspi->getValueInterface(std::get<0>(objInRelation),