From eb316fec33e3866b92357a8aab1dd7a3c4b86075 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 12 Jun 2014 11:38:04 +0200 Subject: [PATCH] libdm: dm_report_object report error for no data NULL data would cause problems.... --- libdm/libdm-report.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 820fa2a36..bdc293bb8 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -738,9 +738,11 @@ int dm_report_object(struct dm_report *rh, void *object) } field->props = fp; - data = _report_get_field_data(rh, fp, object); - if (!data) + if (!(data = _report_get_field_data(rh, fp, object))) { + log_error("dm_report_object: no data for field %s", + rh->fields[fp->field_num].id); return 0; + } if (!rh->fields[fp->field_num].report_fn(rh, rh->mem, field, data,