forked from M-Labs/artiq
1
0
Fork 0

firmware: don't crash on artiq_compile'd kernels (fixes #641).

This commit is contained in:
whitequark 2016-12-19 13:01:18 +00:00
parent 68b2373b9a
commit b9588ddf03
1 changed files with 3 additions and 0 deletions

View File

@ -272,6 +272,9 @@ unsafe fn attribute_writeback(typeinfo: *const ()) {
objects: *const *const ()
}
// artiq_compile'd kernels don't include type information
if typeinfo.is_null() { return }
let mut tys = typeinfo as *const *const Type;
while !(*tys).is_null() {
let ty = *tys;