From: ken Date: Sat, 18 Feb 2017 19:22:43 +0000 (-0800) Subject: fixed potential segfault X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fapc.git;a=commitdiff_plain;h=186680966dbb115d9c09856a2e2b7e1a7070e179 fixed potential segfault --- diff --git a/src/ir.c b/src/ir.c index 27b4d15..d2829d6 100644 --- a/src/ir.c +++ b/src/ir.c @@ -596,8 +596,9 @@ union ir_setdata_t* ir_link link = struct_alloc(ir_link_t); struct_clear(link); link->header.type = LDAT; - link->type = link_type; - link->classld = setld->classld; + link->type = link_type; + if (setld != NULL) + link->classld = setld->classld; link->setld = setld; if (link_type != OLINK && name != NULL) link->header.data_name = name_alloc(name);