aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_crecord.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index 69b21f88..d4b9ddee 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -794,7 +794,7 @@ again:
794 } 794 }
795 } else if (tref_isstr(idx)) { 795 } else if (tref_isstr(idx)) {
796 GCstr *name = strV(&rd->argv[1]); 796 GCstr *name = strV(&rd->argv[1]);
797 if (cd->ctypeid == CTID_CTYPEID) 797 if (cd && cd->ctypeid == CTID_CTYPEID)
798 ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); 798 ct = ctype_raw(cts, crec_constructor(J, cd, ptr));
799 if (ctype_isstruct(ct->info)) { 799 if (ctype_isstruct(ct->info)) {
800 CTSize fofs; 800 CTSize fofs;
@@ -835,6 +835,7 @@ again:
835 CType *cct = ctype_rawchild(cts, ct); 835 CType *cct = ctype_rawchild(cts, ct);
836 if (ctype_isstruct(cct->info)) { 836 if (ctype_isstruct(cct->info)) {
837 ct = cct; 837 ct = cct;
838 cd = NULL;
838 if (tref_isstr(idx)) goto again; 839 if (tref_isstr(idx)) goto again;
839 } 840 }
840 } 841 }