diff options
Diffstat (limited to 'ahl-binding/jsonc_utils.hpp')
-rw-r--r-- | ahl-binding/jsonc_utils.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ahl-binding/jsonc_utils.hpp b/ahl-binding/jsonc_utils.hpp index 02e113b..5e82fca 100644 --- a/ahl-binding/jsonc_utils.hpp +++ b/ahl-binding/jsonc_utils.hpp @@ -31,6 +31,7 @@ inline T& jcast(T& v, json_object* o) template<class T> inline T& jcast_array(T& v, json_object* o) { + if (o == nullptr) return v; auto sz = json_object_array_length(o); for(auto i = 0; i < sz ; ++i) { |