Commit b4496cae authored by Richard Hughes's avatar Richard Hughes
Browse files

tpm-eventlog: Fix a possible crash if not using _new()

parent 2e124572
......@@ -30,7 +30,7 @@ static void
fu_tpm_eventlog_device_to_string (FuDevice *device, guint idt, GString *str)
{
FuTpmEventlogDevice *self = FU_TPM_EVENTLOG_DEVICE (device);
if (self->items->len > 0) {
if (self->items != NULL && self->items->len > 0) {
fu_common_string_append_kv (str, idt, "Items", NULL);
for (guint i = 0; i < self->items->len; i++) {
FuTpmEventlogItem *item = g_ptr_array_index (self->items, i);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment