summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r--libdm/libdm-report.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 3f867674..0bafa86d 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -695,6 +695,11 @@ int dm_report_object(struct dm_report *rh, void *object)
struct dm_report_field *field;
void *data = NULL;
+ if (!rh) {
+ log_error(INTERNAL_ERROR "dm_report handler is NULL.");
+ return 0;
+ }
+
if (!(row = dm_pool_zalloc(rh->mem, sizeof(*row)))) {
log_error("dm_report_object: struct row allocation failed");
return 0;