summaryrefslogtreecommitdiff
path: root/src/ipa/rpi
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rpi')
-rw-r--r--src/ipa/rpi/controller/controller.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp
index fa172113..14d245da 100644
--- a/src/ipa/rpi/controller/controller.cpp
+++ b/src/ipa/rpi/controller/controller.cpp
@@ -56,6 +56,9 @@ int Controller::read(char const *filename)
}
std::unique_ptr<YamlObject> root = YamlParser::parse(file);
+ if (!root)
+ return -EINVAL;
+
double version = (*root)["version"].get<double>(1.0);
target_ = (*root)["target"].get<std::string>("bcm2835");