Ignore:
Timestamp:
Aug 27, 2018, 5:53:28 PM (3 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
381bea6
Parents:
90152a4
Message:

Check for non-null object and dtor in Destructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/builtins.c

    r90152a4 rb7c89aa  
    121121forall(dtype T)
    122122static inline void ^?{}(__Destructor(T) & x) {
    123   x.dtor(x.object);
     123        if (x.object && x.dtor) {
     124          x.dtor(x.object);
     125        }
    124126}
    125127
Note: See TracChangeset for help on using the changeset viewer.