From: Artur Świgoń Date: Thu, 15 Jul 2021 13:50:34 +0000 (+0200) Subject: [AT-SPI] Fix logging object address in bridge-text.cpp X-Git-Tag: dali_2.0.36~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62967f3de9da94467ac00d37c6abf7065e7839f1;hp=--cc;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [AT-SPI] Fix logging object address in bridge-text.cpp The following commit introduced a null pointer dereference bug (by using the wrong variable): commit 0f89686c3137b7972e41c44e48c0da5de385a360 Author: Seoyeon Kim Date: Wed Jun 23 15:11:07 2021 +0900 Update ATSPI code according to DALi coding rule Change-Id: Ie1a2f0185ed90846fba61a999bcea81038621ae0 The bug has been fixed by the following commit which, unfortunately, does not restore logging the object address as is done in other bridge-*.cpp files: commit 11d8929702373f3e7601b7e513f48bec42611844 Author: David Steele Date: Fri Jul 9 12:23:51 2021 +0100 Fixing error found by static analyser Change-Id: I5f6083f6df7e007815c726b22d16c652a01b5be8 Note to people unfamiliar with the AT-SPI bridge: the std::domain_error which is thrown here is serialized as an error reply on DBus which is then sent back to the original caller (e.g. screen-reader). Change-Id: I7e535220dbbdd78703db4af4395e5c3384db5405 --- 62967f3de9da94467ac00d37c6abf7065e7839f1 diff --git a/dali/internal/accessibility/bridge/bridge-text.cpp b/dali/internal/accessibility/bridge/bridge-text.cpp index c1d7b6b..d71a723 100644 --- a/dali/internal/accessibility/bridge/bridge-text.cpp +++ b/dali/internal/accessibility/bridge/bridge-text.cpp @@ -48,7 +48,7 @@ Text* BridgeText::FindSelf() const auto textObject = dynamic_cast(self); if(!textObject) { - throw std::domain_error{"Object doesn't have Text interface"}; + throw std::domain_error{"Object " + self->GetAddress().ToString() + " doesn't have Text interface"}; } return textObject; }