aboutsummaryrefslogtreecommitdiff
path: root/src/json/json_pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json/json_pack.c')
-rw-r--r--src/json/json_pack.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index 1859e264a..a03b09e2c 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -113,7 +113,9 @@ TALER_JSON_pack_amount (const char *name,
113{ 113{
114 struct GNUNET_JSON_PackSpec ps = { 114 struct GNUNET_JSON_PackSpec ps = {
115 .field_name = name, 115 .field_name = name,
116 .object = TALER_JSON_from_amount (amount) 116 .object = (NULL != amount)
117 ? TALER_JSON_from_amount (amount)
118 : NULL
117 }; 119 };
118 120
119 return ps; 121 return ps;
@@ -126,7 +128,9 @@ TALER_JSON_pack_amount_nbo (const char *name,
126{ 128{
127 struct GNUNET_JSON_PackSpec ps = { 129 struct GNUNET_JSON_PackSpec ps = {
128 .field_name = name, 130 .field_name = name,
129 .object = TALER_JSON_from_amount_nbo (amount) 131 .object = (NULL != amount)
132 ? TALER_JSON_from_amount_nbo (amount)
133 : NULL
130 }; 134 };
131 135
132 return ps; 136 return ps;