| Index: tools/battor_agent/battor_finder.cc
|
| diff --git a/tools/battor_agent/battor_finder.cc b/tools/battor_agent/battor_finder.cc
|
| index 0aa54ac12b3b87aaa6fbdff7e757c750e965f963..6137c3b79ff5e73b5ca54429734a71c8f98057b0 100644
|
| --- a/tools/battor_agent/battor_finder.cc
|
| +++ b/tools/battor_agent/battor_finder.cc
|
| @@ -38,7 +38,9 @@ std::string BattOrFinder::FindBattOr() {
|
| // If we have no switch-specified path, look for a device with the right
|
| // display name.
|
| for (size_t i = 0; i < devices.size(); i++) {
|
| - std::string display_name = devices[i]->display_name.get();
|
| + if (!devices[i]->display_name)
|
| + continue;
|
| + const auto& display_name = devices[i]->display_name.value();
|
| if (display_name.find(kBattOrDisplayNamePrefix) != std::string::npos) {
|
| LOG(INFO) << "Found BattOr with display name " << display_name
|
| << " at path " << devices[i]->path;
|
|
|