From fbd8b25bfd592f71503d33c2fe39b550263c9185 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 2 Jul 2025 14:44:28 +0200 Subject: fix: check `builder` variable if not `nullptr` (libbtb example) Signed-off-by: Amlal El Mahrouss --- examples/example_02_libbtb/libbtb.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/example_02_libbtb/libbtb.cc b/examples/example_02_libbtb/libbtb.cc index f3d45b8..21e3e17 100644 --- a/examples/example_02_libbtb/libbtb.cc +++ b/examples/example_02_libbtb/libbtb.cc @@ -1,4 +1,5 @@ #include +#include #ifndef _WIN32 static auto kPath = "./posix.json"; @@ -8,5 +9,7 @@ static auto kPath = ".\win64.json"; int main(int argc, char** argv) { auto builder = new BTB::JSONManifestBuilder(); + if (!builder) return EXIT_FAILURE; + return builder->buildTarget(strlen(kPath), kPath); } -- cgit v1.2.3