[RELAY] Fix segfault in pretty print when ObjectRef is null (#5681)
authorlhutton1 <35535092+lhutton1@users.noreply.github.com>
Fri, 29 May 2020 14:51:30 +0000 (15:51 +0100)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 14:51:30 +0000 (07:51 -0700)
commit3698d5d00441079b28f80b3c5012a94682d8ead4
tree5c4c26ff1407de241815c6deb0fbcd9f1e24006b
parent05b1b235bf006caed0d8220447f14b20382cd527
[RELAY] Fix segfault in pretty print when ObjectRef is null (#5681)

* [RELAY] Fix segfault in pretty print when ObjectRef is null

Encountered when pretty printing module with function attribute equal to NullValue<ObjectRef>().

Change-Id: I2e7b304859f03038730ba9c3b9db41ebd3e1fbb5

* Add test case

Change-Id: I579b20da3f5d49054823392be80aaf78a055f596
src/printer/relay_text_printer.cc
tests/python/relay/test_ir_text_printer.py