Fix a crash in non-buffered rendering.