fix ui crash bug caused by DrawNode

Fix #9036