Fix NPE in DebugOverlay. 

Closes #1376