Added null check on the mesh before getting the graphics device on material#destroy (#3950)
Added null check on the mesh before getting the graphics device on material#destroy (#3950)

* Added null check on the mesh before getting the graphics device on material#destroy

* Fixed debug include

Co-authored-by: Steven Yau <c4e01c0f87a9d4bf034f0f681553ace272d52b0f@snapchat.com>
playcanvas/engine,MicroWorldwide/PlayCanvas,playcanvas/engine,MicroWorldwide/PlayCanvas